Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
PSSlack
0.0.28
Private/Get-UnixTime.ps1
function
Get-UnixTime
{
param
(
$Date
)
$unixEpochStart
=
New-Object
DateTime
1970
,
1
,
1
,
0
,
0
,
0
,
(
[DateTimeKind]
::
Utc
)
[int]
(
$Date
.
ToUniversalTime
(
)
-
$unixEpochStart
)
.
TotalSeconds
}