PS-Commands/Scripts/Get-TimeStamp.psm1
2023-08-03 11:24:09 +03:00

5 lines
No EOL
256 B
PowerShell

function Get-TImeStamp {
$tz = (Get-TimeZone).BaseUtcOffset.TotalMinutes
$unixtime = (New-TimeSpan -Start (Get-Date "01/01/1970") -End ((Get-Date).AddMinutes(-$tz))).TotalSeconds # -3h UTC
([string]$unixtime -replace "\..+") + "000000000"
}