[MOBY-dev] Dashboard and date types

Paul Gordon gordonp at ucalgary.ca
Tue May 29 23:59:06 UTC 2007


After going crazy for hours trying to get SimpleDateFormat to work 
properly, I rolled my own formatter. 
I also now keep the timezone offset data, rather than converting to Zulu 
time (a.k.a. GMT).
I have added some test cases too, so it definitely works for samples from
Central European times (daylight and standard), Halifax (Canada) 
standard,  and
Newfoundland (which uses a half-hour zone).

One minor point: "2007-05-21T00:40:35+01:00" is the time in London
(i.e. ISO8601 does not store daylight data, so time zones flip offsets 
in autumn and spring relative to GMT)

This should now be Case Closed!

>> The ISO8601 parsing code is pretty much ripped directly from a W3C
>> library (and attributed in the comments), so I left the thinking to
>> someone else too. :-)
>>
>> I'll have a look at this timezone issue in the next couple of days though.
>>     
>
>
> Okay, glad to hear it. For me (us), it does not matter much that the method
> was ripped from someone else's code, the important is whether it is correct
> or not. Thanks for looking into it. This is just a reminder of my
> observations regarding this method:
>
> Last, and actually the main question, is that I suspect a bug in the method
>   
>> MobyDataDateTime.getString(calendar). When I feed it with the calendar
>> created from the string "2007-05-21T00:40:35+01:00" I will get a string
>> "2007-05-21T02:40:35Z". The method removed timezone (and replaced it with a
>> single Z letter, which is correct) but the time - that should be now in GMT
>> - is now bigger by two hours when I expected decrease by one hour (moving
>> from my BST time which is +01 to the GMT). Is this a bug or my
>> misinterpretation of the times?
>>
>>     
>
> Cheers,
> Martin
>
>
>   




More information about the MOBY-dev mailing list