monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: cvs_import and timezones


From: Tony Tung
Subject: Re: [Monotone-devel] Re: cvs_import and timezones
Date: Tue, 17 Oct 2006 14:46:37 -0700

On Oct 17, 2006, at 2:42 PM, Zack Weinberg wrote:

Whether the manpage says it or not, I can pretty much guarantee you
libc does do this automatically on OSX and FreeBSD.  If it didn't, the
majority of programs that used localtime() would not work properly.

Straightforward test program follows - I will be surprised if the two
lines it prints are different on any system at all (note that it does
nothing interesting if TZ=UTC).

zw

#include <time.h>
#include <stdio.h>

int main(void)
{
 time_t now = time(0);
 fputs(ctime(&now), stdout);
 tzset();
 fputs(ctime(&now), stdout);
 return 0;
}

You're absolutely right.

Still, I see behavioral differences if I throw that into monotone's cvs_import(..) function. No idea why.

Tony




reply via email to

[Prev in Thread] Current Thread [Next in Thread]