Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari Javascript bug

I have found that Safari cannot handle Javascript Date.parse() correctly which is a major problem for me. I am generating a GMT string in Perl, passing it to a cookie and then using Date.parse(gmtstring) to turn it into milliseconds so that I can do calculations. Every other browser returns the milliseconds correctly but Safari returns NaN. Does anybody have a workaround?

G5 Mac OS X (10.4.8)

Posted on Feb 2, 2007 4:27 AM

Reply
5 replies

Feb 2, 2007 7:07 PM in response to dobrojoe

apparently safari won't parse that particular date format; i think the "GMT" needs to follow the time.

you'll have to use a different format, e.g.:

use POSIX;
my $expDate = strftime "%a %b %e %Y %H:%M:%S GMT", gmtime;


or use javascript to reformat the string.

of course you could also request that safari support native gmtime() format. i think bug 3366 is the one you want.

iBook g4 OS X.4.x

Safari Javascript bug

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.