Howard Answer is correct and please vote for it and accept it.
For reference, I think it is useful to explain the difference between date objects and representations of localized dates.
In many programming languages, date objects are used to represent unique points in time. Ignoring the Relativistic arguments, we can assume that in any case, we can determine a point in time that is universally equal for everyone, regardless of how we measure time.
If for each moment in time we could build a unique label, this label could be transmitted and unambiguously indicated. The purpose of date objects is to act as a unique universal label for a given point in time .
You can think of any number of methods for constructing such a marking scheme, and how each date object selects it does not matter to those who use them.
An example would be the use of a numerical offset from a universal event (X seconds after the sun exploded).
Only when we want to take a time point and serialize it into a human-readable line, we have to deal with the complexities of time zones, locales, etc.
( Local date string ) + ( Date formatting ) => Time point
Timepoint + ( Date Formatting ) => ( Local Date String )
Each time point is universal ... there is no such point as a time point , or gmt time point , only after converting the time point to a local string (using date formatting) does it make any connection with the time zone.
Note. I am sure there are a lot of blogs / articles in this thread, but my google foo is failing at this hour. If anyone has the enthusiasm to expand this problem, please feel free to do it.
Akusete Aug 10 '10 at 4:37
source share