On Fri, Sep 16, 2011 at 10:20 PM, Gé Weijers <g...@weijers.org> wrote:
> - get the time_t value > - use gmtime() to get a 'struct tm' value representing UTC - calculate the # of seconds since 1970-01-01T00:00+0:00 from this > representation, which except for counting leap years is simple enough. > > The downside is that this code is not reentrant. > That's not a concern for this particular case. > Using strftime("%s", ...) does not work either, "%s" is non-standard (it's > not even part of POSIX). > > Isn't writing fully portable C code wonderful? > > BTW: I would not blame anyone for ignoring this issue.... > Actually, i've fought with this in another tree, and the gmtime-using code i posted a couple mails back "seems to work", but i had to google high and low before i found the is_dst=-1 bit. i _really_ want GMT time, so i'm willing to put in a bit of effort for it. -- ----- stephan beal http://wanderinghorse.net/home/stephan/
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users