What steps will reproduce the problem? 1. Date.parse('1997-07-16T19:20:30+00:00').toISOString() != "1997-07-16T10:20:30Z" 2. '+00:00' is not recognized as UTC but as timezone of current machine.
What version of the product are you using? On what operating system?
- svn version
Comment #1
Posted on Aug 6, 2009 by Massive GiraffeAlso,
Using Safari 4 and svn trunk of datejs: Date.parse('1997-07-16T19:20:30Z') != Date.parse(Date.parse('1997-07-16T19:20:30Z').toISOString())
Comment #2
Posted on Mar 10, 2010 by Quick GiraffeHi,
I have had a potentially similar problem. The Date.parse function will not parse the timezone data.
For instance, Date.parse("2010-03-11T09:00:00+01:00") returns null.
I have searched around but found nothing, until I reached the homepage of datejs.com.
There, the demo input field accepted the previous date and parsed it correctly. It was a little surprising so I tried and downloaded the date.js file used there and it worked for me too :)
The date.js built used on the www.datejs.com website has the version:
/** * @version: 1.0 Alpha-1 * @author: Coolite Inc. http://www.coolite.com/ * @date: 2008-05-13 * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved. * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. * @website: http://www.datejs.com/ */
This version parses timezones.
The latest built: /** * Version: 1.0 Alpha-1 * Build Date: 13-Nov-2007 * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved. * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/ */
Does not parse the timezones (or I do something wrong)
Cheers!
- date.js 29.92KB
Comment #3
Posted on Jun 18, 2010 by Swift CatWanted to second what nicolas said in comment #2.
I ran into the exact issue, tried the same thing he did and had the same result.
Comment #4
Posted on Jun 22, 2011 by Happy HippoOver a year later and this fixed the issue for me too
Comment #5
Posted on Nov 7, 2011 by Happy CamelI've got the same problem, the file in the second comment fix the parse method, but not the parseExact one. BTW, is this project dead or it has moved elsewhere???
Comment #6
Posted on May 9, 2012 by Quick HorseNote that the first version is still broken, just in a horribly subtle way.
+00:00 instead of being interpreted as UTC, will be interpreted as your local timezone. The rest looks like it's ok.
Comment #7
Posted on Oct 2, 2012 by Quick RhinoI also came across the same problem. Why is the site using a version from 2008 and the one available for download is from 2007?
Comment #8
Posted on Sep 14, 2013 by Happy Kangaroofixed in the current build at my fork: https://github.com/abritinthebay/datejs/
Status: New
Labels:
Type-Defect
Priority-Medium