gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendarDate bug ?


From: richard
Subject: Re: NSCalendarDate bug ?
Date: Sat, 4 Nov 2000 08:31:55 +0000

On Friday, November 3, 2000, at 06:05 PM, address@hidden wrote:

> Ciao! 
>  
> I'm trying to parse the 'date1' that comes from the db with the following 
> calendar format: @"%d/%m/%Y %H:%M:%S.00 %Z" using [NSCalendarFormat 
> dateWithString:calendarFormat:] 
>  
> date1: 25/08/2000 21:32:30.00 GMT   <- comes from db 
> date2: 25/08/2000 21:32:30.00 WAT   <- after parsing 
>  
> date2 is the result of -description. 
>  
> I don't know what is WAT, but it doesn't work for db row locking (postgres). 
>  
> Is it a bug ? 

Not sure - but I've fixed it anyway - the code was looking up a timezone by 
abbreviation,
but since many abbreviations can map to a single zone, the reverse mapping was 
giving
a different string.  I simply added an attempt to lookup the zone by name 
before trying
a lookup by abbreviation - that waay you get the GMT timezone, rather than a 
raandom timezone
that is the same as GMT.

Beyond that, I'm not sure - I just assume the timezone code is OK - it seems to 
generally
behave as expected, but since exact behavior is not defined anywhere, there 
will almost
certainly be differences from the MacOS-X behavior.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]