[BUG] GTimeZone broken on Windows
Dirk Hohndel
dirk at hohndel.org
Wed Feb 27 09:13:04 PST 2013
Linus Torvalds <torvalds at linux-foundation.org> writes:
> On Wed, Feb 27, 2013 at 8:05 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>
>> That is a MASSIVE undertaking. Time zones are insanely complicated and
>> annoying. And they change all the time. I'd much rather find a library
>> that is out there, is maintained, and works.
>
> It's called "standard C library".
>
> Dicking around with timezones is stupid. Don't do it. Just do what
> info.c already does:
>
> time_t now;
> struct timeval tv;
>
> gettimeofday(&tv, NULL);
> now = tv.tv_sec;
> time = localtime(&now);
>
> and you're done. Really. None of this idiotic gliib crap. glib
> interfaces are almost universally stupid.
>
> Now you can turn it into our own interface format by using our very
> own "utc_mktime()", which is rather simple and just ignores the
> timezone information in 'struct tm'.
I think sending a patch would have been less typing :-)
/D
More information about the subsurface
mailing list