I'm starting a new thread, for clarity.
I'm assuming that it's ECMA-262 3rd Edn (1999) that we should be using
for Web pages; that 4th Edn (what's its present status? is it
available?) is too advanced for compatibility with many browsers in
present-day use; that Web authors should be aware of what JScript and
.NET may do, but cannot rely on it; and that MS documents describe the
latest MS code as distinct from agreed standards.
ECMA-262, 3rd Edn, Sec 22.214.171.124 says "Leap seconds are ignored" and that
there are exactly 86,400,000 milliseconds per day. (It overrides that
in 126.96.36.199 #1 by +-3,600,000 ms for Summer Time changes.)
It appears that at least some Linux browsers get the OS to do at least
some conversions between Y M D h m s and DateObject.valueOf(); and that
the OS, having access to a Leap Second database, does the
conversion according to the rules in force at the date in question. At
present, there have been 23 positive (and no negative) Leap seconds
since Epoch at UTC 1970.0, the first being 1972-06-30 23:59:60 UTC.
(( Systems not recently updated may not know of
the Leap Second preceding 2006.0 UTC ))
In such systems, any code which assumes that new Date(Y, M, D)
returns a multiple of 864e5 give or take the Time Zone Offset is liable
to error, except when suitably rounded; 23 seconds may seem unimportant,
but it can put the result into the wrong minute, hour, day, month, or
ISTM that suppliers of non-compliant browsers should be notified
appropriately, with examples of problems caused.
It is likely that a number of routines on my pages will FAIL on browsers
that show Leap Seconds.
Is UNIX time_t specified as either with or without Leap seconds?
IMHO, the existing (ECMA3 at least) Date Object Methods should ignore
Leap Seconds, now and in al future versions. But there could be an
added Method, matching getTimezoneOffset, which would return either the
number of Leap Seconds since 1970 or the difference TAI-UTC (ten
ECMA also requires that the current Summer Time rules are applied for
all dates; it seems that such browsers can also get that wrong, though
the effects may be less serious. Americans can test 31st March and 1st
November of 2006 and 2007.
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. Web<
PAS EXE etc <
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.