mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 09:15:22 +02:00
Add unix epoch commands
These differ between Linux and OS X so the pages needed to be split.
This commit is contained in:
parent
ff14ef08b6
commit
8136ac1930
2 changed files with 27 additions and 0 deletions
|
@ -9,3 +9,11 @@
|
|||
- Display the date in UTC and ISO 8601 format:
|
||||
|
||||
`date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
||||
|
||||
- Display the number of seconds since the unix epoch:
|
||||
|
||||
`date +%s`
|
||||
|
||||
- Convert a unix epoch timestamp to a date:
|
||||
|
||||
`date -d @1473305798`
|
19
pages/osx/date.md
Normal file
19
pages/osx/date.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# date
|
||||
|
||||
> Set or display the system date.
|
||||
|
||||
- Display the date using the default locale:
|
||||
|
||||
`date +"%c"`
|
||||
|
||||
- Display the date in UTC and ISO 8601 format:
|
||||
|
||||
`date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
||||
|
||||
- Display the number of seconds since the unix epoch:
|
||||
|
||||
`date +%s`
|
||||
|
||||
- Juggle a timestamp representing seconds since the Unix expoch to a date:
|
||||
|
||||
`date -j -r 1473305798`
|
Loading…
Add table
Reference in a new issue