nanog mailing list archives
Re: Unix Timestamp
From: Henry Yen <henry () AegisInfoSys com>
Date: Tue, 23 Oct 2001 02:57:19 -0400
On Mon, Oct 22, 2001 at 08:45:25AM -0400, Greg A. Woods wrote:
[ On Monday, October 22, 2001 at 18:18:41 (-0500), Chris Adams wrote: ]On Red Hat Linux 7.1: $ date -r 1003723200 date: 1003723200: No such file or directoryThe first two were kinda sad examples of the state of commercial Unix (unfortunately even SuSv2 lacks this now ancient feature!), but this
sounds like a BSD-ism (for purists?); NetBSD 1.5.2 has the "-r" option, and it works as expected. Linux 6.2 and up switched to sh-utils-2.0, which uses "-r" as "refer to date of file", so there's now a clear divergence.
last one (i.e. GNU date) surprises the heck out of me -- especially since there's not even an equivalent option with a different name....
yes, especially, as you can go forward: bash$ date "+%s" 1003819816 however, a quick reading of the doc indicated that one can do: bash$ date --date="01/01/1970 UTC 1003819816 seconds" Tue Oct 23 02:50:16 EDT 2001 unfortunately, the timezone (EDT here) doesn't work right, except on a old slackware box (which is probably a bug, either way). -- Henry Yen Aegis Information Systems, Inc. Senior Systems Programmer Hicksville, New York
Current thread:
- Re: Unix Timestamp Steven M. Bellovin (Oct 22)
- <Possible follow-ups>
- Unix Timestamp Brandon Handeland (Oct 22)
- Re: Unix Timestamp Pat Myrto (Oct 22)
- Re: Unix Timestamp Barry Shein (Oct 22)
- Re: Unix Timestamp Greg A. Woods (Oct 22)
- Re: Unix Timestamp Chrisy Luke (Oct 22)
- Re: Unix Timestamp Chris Adams (Oct 22)
- Re: Unix Timestamp Greg A. Woods (Oct 22)
- Re: Unix Timestamp Michael L. Barrow (Oct 22)
- Re: Unix Timestamp Henry Yen (Oct 22)
- Re: Unix Timestamp Owen DeLong (Oct 23)
- Re: Unix Timestamp Pat Myrto (Oct 22)
- Re: Unix Timestamp Nathan Stratton (Oct 22)
- Re: Unix Timestamp Michael L. Barrow (Oct 22)