|
From: | Simon Josefsson |
Subject: | Re: [Bug-gnulib] new module: timegm |
Date: | Mon, 01 Sep 2003 16:07:19 +0200 |
User-agent: | Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Bruno Haible <address@hidden> writes: > Simon Josefsson wrote: >> How about a timegm module? > > What do you think about the implementation at > http://lists.debian.org/deity/2002/deity-200204/msg00082.html > ? It looks more likely to be reliable (setenv/tzset/mktime doesn't sound like a good approach in a threaded environment). I'll test it. >> +/* Convert calendar time to simple time, inverse of mktime. */ >> +extern time_t timegm (struct tm *tm); > > What about the tm_isdst field? Is the caller expected to set it or not? > The comments should say so. I'm asking because the first thing the glibc > implementation of timegm does is to erase the tm->tm_isdst field. I don't know. The timegm man page and the libc manual are silent on the issue.
[Prev in Thread] | Current Thread | [Next in Thread] |