Re: NSCalendar bug (mktime related)

2020-04-26 Thread Fred Kiefer
I changed a few things in NSCalendar: First I completed NSDateComponents up to the recent Cocoa specification. That part should be fairly complete and correct. Next I tried to support more of these components in the existing NSCalendar methods. While doing so I noticed some oddities in that

Re: NSCalendar bug (mktime related)

2020-04-25 Thread Stefan Bidigaray
Hi Fred/Andreas, I wrote all that code, so I'm fairly familiar with it. The code is entirely dependent on ICU's implementation of ucal, so the solution is to simply set the Time Zone value in the ucal. The function to do this is: ucal_setTimeZone() (

Re: NSCalendar bug (mktime related)

2020-04-25 Thread Fred Kiefer
Hi Andreas, I checked the code of NSCalendar, which you could have done yourself, this is free software, and we are not using mtkime there. The problem is a lot worse. We just ignore the handed in time zone of the NSDateComponents. This could be repaired but I am no expert on NSCalendar so if

NSCalendar bug (mktime related)

2020-04-23 Thread Andreas Fink
Hello all, I have run into a very weird thing in conversion from NSStrings to NSDate. The result is we are always off by 1h under LInux. Under MacOS X I have the same problem but only with mktime() not with NSCalendar. I am suspecting Gnustep implementation probably uses mktime() in the back