ConvertUnixTimestamp
0.0.1
Apteco PS Modules - PowerShell unix timestamp conversion
Converts a [DateTime] into a numeric unix timestamp as [UInt64] and vice versa.
To get a unix timestamp from a [DateTime]::Now or (Get-Date) just do it like in these examples
Get-Unixtime
Get-Unixtime -InMilliseconds
Get-Unixtime -InMilliseconds -Timestamp ( Get-Date ).AddDays(-2)
To convert a time
Converts a [DateTime] into a numeric unix timestamp as [UInt64] and vice versa.
To get a unix timestamp from a [DateTime]::Now or (Get-Date) just do it like in these examples
Get-Unixtime
Get-Unixtime -InMilliseconds
Get-Unixtime -InMilliseconds -Timestamp ( Get-Date ).AddDays(-2)
To convert a time
Apteco PS Modules - PowerShell unix timestamp conversion
Converts a [DateTime] into a numeric unix timestamp as [UInt64] and vice versa.
To get a unix timestamp from a [DateTime]::Now or (Get-Date) just do it like in these examples
Get-Unixtime
Get-Unixtime -InMilliseconds
Get-Unixtime -InMilliseconds -Timestamp ( Get-Date ).AddDays(-2)
To convert a timestamp back, just do it like here
ConvertFrom-UnixTime -Unixtime 1591775090
ConvertFrom-UnixTime -Unixtime 1591775090 -ConvertToLocalTimezone
ConvertFrom-UnixTime -Unixtime 1591775146091 -InMilliseconds
( ConvertFrom-UnixTime -Unixtime $lastSession.timestamp ).ToString("yyyy-MM-ddTHH:mm:ssK")
Show more
Converts a [DateTime] into a numeric unix timestamp as [UInt64] and vice versa.
To get a unix timestamp from a [DateTime]::Now or (Get-Date) just do it like in these examples
Get-Unixtime
Get-Unixtime -InMilliseconds
Get-Unixtime -InMilliseconds -Timestamp ( Get-Date ).AddDays(-2)
To convert a timestamp back, just do it like here
ConvertFrom-UnixTime -Unixtime 1591775090
ConvertFrom-UnixTime -Unixtime 1591775090 -ConvertToLocalTimezone
ConvertFrom-UnixTime -Unixtime 1591775146091 -InMilliseconds
( ConvertFrom-UnixTime -Unixtime $lastSession.timestamp ).ToString("yyyy-MM-ddTHH:mm:ssK")
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2022 Apteco GmbH. All rights reserved.
Package Details
Author(s)
- florian.von.bracht@apteco.de
Tags
PSEditions
Dependencies
This module has no dependencies.
Release Notes
0.0.1 Initial release through PSGallery
FileList
- ConvertUnixTimestamp.nuspec
- ConvertUnixTimestamp.psd1
- ConvertUnixTimestamp.psm1
- Public\ConvertFrom-UnixTime.ps1
- Public\Get-Unixtime.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
0.0.1 (current version) | 174 | 11/2/2022 |