Mail Archives: djgpp/2002/08/07/10:45:18
However there's either a bug in the program or in the
documentation. The documentation says the "--date" option shouldn't
affect "%s". "-d" is == "--date" (both documentally (Is there such an
English word?) and functionally). Hence ``date --utc "%s"'' and ``date
-d "Jan 1 1980" --utc "%s"'' should give the same result, but does
not:
> date --version
date (GNU sh-utils) 2.0j
Written by David MacKenzie.
Copyright (C) 2000 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
> date --utc "+%s"
1028736530
> date -d "Jan 1 1980" --utc "+%s"
315532800
> date "+%s"
1028736567
> date -d "Jan 1 1980" "+%s"
315532800
Right,
MartinS
- Raw text -