[BUG] GTimeZone broken on Windows
Linus Torvalds
torvalds at linux-foundation.org
Wed Feb 27 08:17:20 PST 2013
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'.
Linus
More information about the subsurface
mailing list