Re: [qooxdoo-devel] qooxdoo 3.0.x : Error parsing (valid) date ...
Hello Thomas,
> Hi Peter,
>
> please open a bug an attach your patch there.
Done! BUG #7915 [1]
> Thanks,
> T.
Regards,
Peter
[1] [Bug 7915] Error parsing (valid) date with
qx.util.format.DateFormat("isoUtcDateTime")
--
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] qooxdoo 3.0.x : Error parsing (valid) date ...
Peter,
please open a bug an attach your patch there.
Thanks,
T.
On Fri, 29 Nov 2013 16:51:38 +0100, Peter Schneider
wrote:
> The attached patch seems to fix the issue!
> And still checks whether "the value for day or month is too large".
>
> /Peter
>
> On 11/29/2013 2:01 PM Peter Schneider wrote:
>> Hi again,
>>
>> the problem seems to be even worse :(
>>
>> The offset calculation seems to be entirely wrong...
>>
>>
>> var fmt = new qx.util.format.DateFormat("isoUtcDateTime");
>> var ddd = fmt.parse("2004-04-04T04:04:04Z");
>> ddd.getUTCHours(); // This does NOT return 4 !!!
>>
>>
>> Either I am completely confused, or there is some issue in that
>> formatter/parser
>> (seems to be that the UTC-offset is added instead of subtracted
>> ...or the other way around)
>>
>> /Peter
>>
>>
>>
>> On 11/29/2013 11:55 AM Peter Schneider wrote:
>>> Hi qooxdoo-devs,
>>>
>>> the current implementation of qx.util.format.DateFormat is not able to
>>> parse
>>> "isoUtcDateTime" when it comes to a 'year-change' due to timezone
offset
>>> (GMT+1)
>>>
>>>
>>> Following example...
>>>
>>>
>>> (new
>>>
qx.util.format.DateFormat("isoUtcDateTime")).parse("2013-01-01T00:00:00Z")
>>>
>>>
>>> ...throws the following exception:
>>>
>>> Error: Error parsing date '2013-01-01T00:00:00Z': the value for day
>>> or month
>>> is too large
>>>
>>>
>>>
>>> Due to the fact that most of my clients are at GMT+1, I hope this gets
>>> fixed
>>> before New Year's Eve :)
>>>
>>> /Peter
>>>
>>>
>>> P.S.: Do you think it is needed to open a bug-report for this?
>>>
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] qooxdoo 3.0.x : Error parsing (valid) date ...
The attached patch seems to fix the issue!
And still checks whether "the value for day or month is too large".
/Peter
On 11/29/2013 2:01 PM Peter Schneider wrote:
> Hi again,
>
> the problem seems to be even worse :(
>
> The offset calculation seems to be entirely wrong...
>
>
> var fmt = new qx.util.format.DateFormat("isoUtcDateTime");
> var ddd = fmt.parse("2004-04-04T04:04:04Z");
> ddd.getUTCHours(); // This does NOT return 4 !!!
>
>
> Either I am completely confused, or there is some issue in that
> formatter/parser
> (seems to be that the UTC-offset is added instead of subtracted
> ...or the other way around)
>
> /Peter
>
>
>
> On 11/29/2013 11:55 AM Peter Schneider wrote:
>> Hi qooxdoo-devs,
>>
>> the current implementation of qx.util.format.DateFormat is not able to parse
>> "isoUtcDateTime" when it comes to a 'year-change' due to timezone offset
>> (GMT+1)
>>
>>
>> Following example...
>>
>>
>> (new
>> qx.util.format.DateFormat("isoUtcDateTime")).parse("2013-01-01T00:00:00Z")
>>
>>
>> ...throws the following exception:
>>
>> Error: Error parsing date '2013-01-01T00:00:00Z': the value for day or
>> month
>> is too large
>>
>>
>>
>> Due to the fact that most of my clients are at GMT+1, I hope this gets fixed
>> before New Year's Eve :)
>>
>> /Peter
>>
>>
>> P.S.: Do you think it is needed to open a bug-report for this?
>>
--
Index: DateFormat.js
===
--- DateFormat.js (revision 2239)
+++ DateFormat.js (working copy)
@@ -829,12 +829,10 @@
dateValues.year = dateValues.year * dateValues.era;
}
- var date = new Date(dateValues.year, dateValues.month, dateValues.day,
(dateValues.ispm) ? (dateValues.hour + 12) : dateValues.hour, dateValues.min,
dateValues.sec, dateValues.ms);
+ var date = (this.__UTC)
+ ? new Date(Date.UTC(dateValues.year, dateValues.month, dateValues.day,
(dateValues.ispm) ? (dateValues.hour + 12) : dateValues.hour, dateValues.min,
dateValues.sec, dateValues.ms))
+ : new Date(dateValues.year, dateValues.month, dateValues.day,
(dateValues.ispm) ? (dateValues.hour + 12) : dateValues.hour, dateValues.min,
dateValues.sec, dateValues.ms);
- if(this.__UTC) {
-date = new
Date(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds(),date.getUTCMilliseconds());
- }
-
if (dateValues.month != date.getMonth() || dateValues.year !=
date.getFullYear())
{
// TODO: check if this is also necessary for the time components
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] qooxdoo 3.0.x : Error parsing (valid) date ...
Hi again,
the problem seems to be even worse :(
The offset calculation seems to be entirely wrong...
var fmt = new qx.util.format.DateFormat("isoUtcDateTime");
var ddd = fmt.parse("2004-04-04T04:04:04Z");
ddd.getUTCHours(); // This does NOT return 4 !!!
Either I am completely confused, or there is some issue in that
formatter/parser
(seems to be that the UTC-offset is added instead of subtracted
...or the other way around)
/Peter
On 11/29/2013 11:55 AM Peter Schneider wrote:
> Hi qooxdoo-devs,
>
> the current implementation of qx.util.format.DateFormat is not able to parse
> "isoUtcDateTime" when it comes to a 'year-change' due to timezone offset
> (GMT+1)
>
>
> Following example...
>
>
> (new
> qx.util.format.DateFormat("isoUtcDateTime")).parse("2013-01-01T00:00:00Z")
>
>
> ...throws the following exception:
>
> Error: Error parsing date '2013-01-01T00:00:00Z': the value for day or month
> is too large
>
>
>
> Due to the fact that most of my clients are at GMT+1, I hope this gets fixed
> before New Year's Eve :)
>
> /Peter
>
>
> P.S.: Do you think it is needed to open a bug-report for this?
>
--
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
