Why the discrepancy in date?

Dotan Cohen dotancohen at gmail.com
Sun Jan 8 10:32:26 UTC 2012


For determining the current date, my date functions roundtrip just fine:
✈saturn:~$ date
Sun Jan  8 12:32:24 IST 2012
✈saturn:~$ date +%s
1326018753
✈saturn:~$ date -d @1326018753
Sun Jan  8 12:32:33 IST 2012


However, for dates in the past they do not:
✈saturn:~$ date +%s -d 2006-12-31t22:00
1167577200
✈saturn:~$ date -d @1167577200
Sun Dec 31 17:00:00 IST 2006
✈saturn:~$

Notice that 22:00 became 17:00 - that is a five hour difference!

As can be seen, I am on IST, which is UTC+2, so it does not account
for the discrepancy:
http://en.wikipedia.org/wiki/Israel_Standard_Time

This is on Kubuntu 11.10. Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com




More information about the ubuntu-users mailing list