Re: tai64nlocal not showing localtime
Peter Samuel <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
Quoting Mariano Absatz <[email protected]>: > On Thu, 28 Oct 2004 21:19:42 -0400, Peter Samuel > <[email protected]> wrote: > > ... > > What do you see when you run tia64nlocal on the value above. When I set my > TZ to > > yours I see: > > > > [peters@zebedee]% TZ=America/Argentina/Buenos_Aires tai64nlocal < current > > 2004-10-28 22:11:59.598341500 what time is it > > [peters@zebedee]% echo @40000000418198e923a9f77c what time is it | > > TZ=America/Argentina/Buenos_Aires tai64nlocal > > 2004-10-28 22:11:59.598341500 what time is it > > > > What do you see? if you see the same thing then tai64nlocal is working as > > advertised and the timstamps in your data are "wrong". > > > > Nope... timestamps are OK (the first thing I did was to restart > multilog)... I copied your 'current' file and I got 'UTC' results :-( > > [admin@fg:WK 0]# tai64nlocal < current; cat current > 2004-10-29 01:11:59.598341500 what time is it > @40000000418198e923a9f77c what time is it > [admin@fg:WK 0]# TZ=America/Argentina/Buenos_Aires tai64nlocal < current > 2004-10-29 01:11:59.598341500 what time is it > [admin@fg:WK 0]# echo @40000000418198e923a9f77c what time is it | > TZ=America/Argentina/Buenos_Aires tai64nlocal > 2004-10-29 01:11:59.598341500 what time is it Your times are different to mine. I would expect you to see EXACTLY the same as what I see. The tai64n timestamps are absolute and have no timezone information. That suggests to me that your tai64nlocal is definitely misbehaving. Here's another test you can run (assuming you have perl). You should get exactly the same results as I do. If you do see the same results then tai64nlocal is broken. If you don't see the same results but they are 3 hours ahead of mine suggests a systemic problem with either libc or your timezone files. The 3 hours difference may be indicative given the fact that Buenos_Aires is currently 3 hours behind GMT or it may be coincidental. [peters@zebedee]% TZ=America/Argentina/Buenos_Aires perl -e 'print scalar(localtime 1099074075), "\n";' Fri Oct 29 15:21:15 2004 ~ [peters@zebedee]% TZ=America/Argentina/Buenos_Aires perl -e 'print scalar(gmtime 1099074075), "\n";' Fri Oct 29 18:21:15 2004 ~ [peters@zebedee]% TZ=GMT perl -e 'print scalar(gmtime 1099074075), "\n";' Fri Oct 29 18:21:15 2004 ~ [peters@zebedee]% TZ=GMT perl -e 'print scalar(localtime 1099074075), "\n";' Fri Oct 29 18:21:15 2004 -- Regards Peter ---------- Peter Samuel [email protected] +1 613 729 7964