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

Re: Weird time-zone oscillation



On 12/13/2009 10:54 PM, Kumar Appaiah wrote:
On Sun, Dec 13, 2009 at 10:14:11PM +0100, David Kubicek wrote:
If/when you find a solution, send it here for other people who might
google for the same issue, but I from your description it's a libc bug.

Here's the solution:

http://lists.debian.org/debian-user/2009/12/msg00797.html
http://lists.debian.org/debian-user/2009/12/msg00799.html


Please note that zeroing struct tm is *not* the solution. Current GNU libc man page doesn't speak about it, and I can see it sets tm_isdst to -1 as would be expected, but SUSv3 says that strptime() doesn't have to do it. To be portable across various implementations (and possibly also older GNU libc versions), one should set tm_isdst to -1 *after* the call themselves.

I don't know which version of libc you have, but pre-call memset is not correct. Just a heads up for the other guy you were talking about.

--
David Kubicek


Reply to: