https://github.com/joeymeijer/powershell-epoch
function to convert datetime to epoch
https://github.com/joeymeijer/powershell-epoch
epoch epoch-converter epoch-time powershell unix-time-converter
Last synced: 26 days ago
JSON representation
function to convert datetime to epoch
- Host: GitHub
- URL: https://github.com/joeymeijer/powershell-epoch
- Owner: joeymeijer
- Created: 2025-02-28T10:46:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-28T10:51:34.000Z (over 1 year ago)
- Last Synced: 2025-03-10T20:48:36.306Z (over 1 year ago)
- Topics: epoch, epoch-converter, epoch-time, powershell, unix-time-converter
- Language: PowerShell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# powershell-epoch
function to convert datetime to epoch
with the function loaded in your pssession, you can convert the current datetime to epoch to simply use the parameters, or parse the datetime object to the function.
like:
```powershell
get-epoch -year 2025 -month 1 -day 1 -hour 00 -minute 00 -second 00 -millisecond 00
```
or
```powershell
get-date 1-1-2025 | get-epoch
```
or
```powershell
get-date 17:00 | get-epoch
```