Convert various epoch times to System.DateTime times in PowerShell.
PowerShell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Epochs.Tests.ps1
Epochs.psd1
Epochs.psm1
README.md

README.md

Epochs-powershell

Convert various epoch times to System.DateTime times in PowerShell.

PS /home/tim/posh/Epochs-powershell> Import-Module ./Epochs

PS /home/tim/posh/Epochs-powershell> Unix(1234567890)

Friday, February 13, 2009 11:31:30 PM


PS /home/tim/posh/Epochs-powershell> Chrome(12879041490654321)

Friday, February 13, 2009 11:31:30 PM


PS /home/tim/posh/Epochs-powershell> ToUnix([datetime]"2009-02-13 23:31:30")

1234567890


PS /home/tim/posh/Epochs-powershell> ToChrome([datetime]"2009-02-13 23:31:30")

1.287904149E+16

A note about environment

I am developing this in Linux. I have not tried anything in Windows or MacOS. Pull requests welcome!

See Also

This project was originally done in Perl. See its gh-page for motivation.

There are also versions in