timezone printing in date messed up?
$ sh 'EOF' for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -j -f %s `expr 1194163200 + 600 \* $a` done EOF Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PST 2007 --- Sun Nov 4 01:40:00 PST 2007 --- Sun Nov 4 01:50:00 PST 2007 --- Sun Nov 4 01:00:00 PDT 2007 --- Sun Nov 4 01:10:00 PDT 2007 --- Sun Nov 4 01:20:00 PDT 2007 --- Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 02:00:00 PST 2007 $ Look at the lines with ---! This is with the latest timezone files. OS X Leopard has the same bug. I assume this is a bug and not due to an act of congress that mandates a flip flop timezone? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: timezone printing in date messed up?
$ sh 'EOF' for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -j -f %s `expr 1194163200 + 600 \* $a` done EOF snip buggy output OS X Leopard has the same bug ... How did you test it in Leopard? I tried it in Tiger, intending to contribute another data point, and I got: date: illegal option -- j usage: date [-nu] [-r seconds] [+format] date [cc]yy]mm]dd]hh]mm[.ss] The Tiger manpage gives no obvious equivalent to FreeBSD's -j ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: timezone printing in date messed up?
OS X Leopard has the same bug ... How did you test it in Leopard? I tried it in Tiger, intending to contribute another data point, and I got: Leopard's /bin/date accepts -j. You can try compiling FreeBSD date on Tiger. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: timezone printing in date messed up?
OS X Leopard has the same bug ... How did you test it in Leopard? I tried it in Tiger, intending to contribute another data point, and I got: Leopard's /bin/date accepts -j. You can try compiling FreeBSD date on Tiger. I had decided against that, since it would propagate the bug if it happened to be in the FreeBSD /bin/date. It turns out the output conversion can be tested using -r: for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -r `expr 1194163200 + 600 \* $a` done and this gives correct results in both Tiger and 6.1: Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PDT 2007 Sun Nov 4 01:40:00 PDT 2007 Sun Nov 4 01:50:00 PDT 2007 Sun Nov 4 01:00:00 PST 2007 Sun Nov 4 01:10:00 PST 2007 Sun Nov 4 01:20:00 PST 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 02:00:00 PST 2007 but the original command, run in 6.1, exhibits the bug: for a in 0 1 2 3 4 5 6 7 8 9 10 11 12 do date -j -f %s `expr 1194163200 + 600 \* $a` done Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 01:00:00 PDT 2007 Sun Nov 4 01:10:00 PDT 2007 Sun Nov 4 01:20:00 PDT 2007 Sun Nov 4 01:30:00 PST 2007 Sun Nov 4 01:40:00 PST 2007 Sun Nov 4 01:50:00 PST 2007 Sun Nov 4 02:00:00 PST 2007 Maybe this helps someone familiar with the internals of /bin/date fix it in time for next fall :) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]