in reply to Year 2038
Well, That's the reason I did stop using epoch numbers when manipulating dates. I'd prefer to stick with a date format like ISO$SomeNumberIDontRemember8601 (YYYY-MM-DD HH:MM:SS TZ). This way you won't fall into this type of weirdness, but you won't fall into some common hard-to-track miscalculations like:
(1) Well, just to illustrate: Imagine the accounts department of company X in Japan uses the same machine the accounts departament in US. What would happen if you forget about the timezone and convert to epoch numbers?
Well, you will see 2006-01-01 6:00am (Japan TZ), You will convert it to epoch number in that TZ... When people in Japan look the register and will see 2006-01-01 6:00am, but the guys in US will see 2005-12-31 6:00pm (US TZ). Looking by one side, it's correct, because 2006-01-01 6:00am on Japan really was 2005-12-31 6:00pm in US, but that can cause a HUGE confusion...
So, my recommendation is to ALWAYS store the date in a format that allows you to store the TZ, and ALWAYS display the date in the format it was entered, displaying the TZ on which it was entered.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Year 2038
by trammell (Priest) on Dec 28, 2005 at 15:19 UTC | |
by ruoso (Curate) on Dec 28, 2005 at 20:20 UTC | |
|
Re^2: Year 2038
by Celada (Monk) on Dec 29, 2005 at 21:37 UTC | |
by ruoso (Curate) on Dec 30, 2005 at 14:29 UTC | |
|
Re^2: Year 2038
by DrHyde (Prior) on Jan 06, 2006 at 10:15 UTC | |
by Perl Mouse (Chaplain) on Jan 06, 2006 at 10:33 UTC |