PS-Commands/Scripts/Get-TimeStamp.psm1

5 lines
256 B
PowerShell
Raw Permalink Normal View History

2023-08-17 13:45:36 +03:00
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"
}