mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(Examples of date): Give example of @seconds.
This commit is contained in:
1 parent
72049d2e2e
commit
d98da55f1d
1 file changed
+8
@@ -12514,6 +12514,14 @@ date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z"
|
||||
1999-12-31 19:00:00 -0500
|
||||
@end smallexample
|
||||
|
||||
Or if you do not mind depending on the @samp{@@} feature present since
|
||||
coreutils 5.3.0, you could shorten this to:
|
||||
|
||||
@smallexample
|
||||
date -d @@946684800 +"%F %T %z"
|
||||
1999-12-31 19:00:00 -0500
|
||||
@end smallexample
|
||||
|
||||
Often it is better to output UTC-relative date and time:
|
||||
|
||||
@smallexample
|
||||
|
||||
Reference in new issue
Block a user