I'm having a bit of an issue when dealing with getting a timestamp from an iso8061 date. For some reason it work perfectly in Chrome, but causes an Invalid Date error in Firefox. The exact line is:
var date = new Date(time.replace(/-/g,"/").replace(/[TZ]/g," "));
I've tried passing the date through (as the var time) 2011-03-09T16:46:58+00:00
, 2011-03-09T16:46:58+0000
and 2011-03-09T16:48:37Z
as per the spec outlined http://www.jibbering.com/faq/#dates but I still can't seem to get it to work in firefox. In fact, the last method didn't work in either browser.
If anyone could help me turn this iso8061 date into a timestamp, that would be great.
Thanks, Angelo R.