JavaScript Programmer’s Reference Converting from UTC to local (Web design)
JavaScript Programmer’s Reference Converting from UTC to local time and back may not yield an identical value due to deficiencies in daylight savings time computations. ECMA does not mandate that a compliant implementation needs to take DST into account only that it be aware that DST may be in force. Some locales use the same DST setting all year round in some years and that is difficult to predict and encapsulate into an algorithm. See also: Broken down time, Calendar time, Date and time, Daylight savings time adjustment, Local time zone adjustment Cross-references: ECMA 262 edition 2 section 15.9.1.9 ECMA 262 edition 3 section 15.9.1.9 Local time zone adjustment (Definition) An adjustment to locale specific time. Availability: ECMAScript edition 2 ECMA compliant implementations are expected to determine the local time zone adjustment. The local time zone adjustment is a value (internally referred to as LocalTZA) which is measured in milliseconds and can be added to the UTC value representing the local standard time. The ECMA standard states that daylight savings time is not reflected in the LocalTZA value. LocalTZA does not vary with time but depends only on the geographic location. See also: Broken down time, Daylight savings time adjustment, Local time Cross-references: ECMA 262 edition 2 section 15.9.1.7 ECMA 262 edition 3 section 15.9.1.7 Locale-specific behavior (Definition) Behavior that depends on a locale setting. The locale setting is a way of defining how programs operate in an international or geographic context. Running software in London and New York may be very similar apart from the instantaneous time setting. The time in New York is 5 hours behind London. If the software running in both locations needs to communicate with the other and will have to perform time based operations on data, then to remain properly synchronized they may need to be aware of the number of time zones between the two systems and make adjustments accordingly. 1354