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
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

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name ConvertUnixTimestamp

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name ConvertUnixTimestamp

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2022 Apteco GmbH. All rights reserved.

Package Details

Author(s)

  • florian.von.bracht@apteco.de

Tags

Windows Apteco

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes


0.0.1 Initial release through PSGallery

FileList

Version History

Version Downloads Last updated
0.0.1 (current version) 97 11/2/2022