[webkit-dev] Stumped by Date() results in Safari

Jason White jason at jason.white.name
Tue Feb 13 12:57:36 PST 2007


If I'm posting to a very wrong place, please let me know. I'm having a
problem with a Javascript date in Safari that is preventing me from
supporting it alongside Firefox, IE, and Navigator.

It appears that Safari has a problem when I attempt to use new Date()
and pass in a string formatted date greater than 01/19/2038. Using  x
= new Date('01/19/2038').getTime(), it appears that the milliseconds
since 01/01/1970 never goes over 214748364700 no matter what you set
the date to..but it can be less. IE and Firefox will go much higher
than that. Converting that number to binary, it doesn't look like
anything is getting overflowed (it's not all 1s)

Can anyone help me figure out what is wrong here? I can't imagine it's
Safari's fault, or someone would have noticed by now. I don't think
it's a system configuration issue because the other browsers don't
have the same problem.

Also, if anyone knows of a good reference book on this browser please
let me know! For some reason I'm having a hard time finding much
information on developing for it's peculiarities.

Thanks,

Jason White
Developer
New England Research Institute



More information about the webkit-dev mailing list