This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
localtime.cc
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 19 Dec 2002 21:01:02 -0500
- Subject: localtime.cc
While I am at it, there is also this one. It's an improvement, not
a bug fix, cutting down on tzset trashing around as visible in strace.
Pierre
2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
* localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
in the Cygwin specific part of the routine.
Index: localtime.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/localtime.cc,v
retrieving revision 1.7
diff -u -p -r1.7 localtime.cc
--- localtime.cc 23 Sep 2002 00:31:30 -0000 1.7
+++ localtime.cc 20 Dec 2002 01:53:34 -0000
@@ -1451,7 +1451,9 @@ tzsetwall P((void))
/* printf("TZ deduced as `%s'\n", buf); */
if (tzparse(buf, lclptr, FALSE) == 0) {
settzname();
- setenv("TZ", buf, 1);
+ lcl_is_set = 1;
+ strlcpy(lcl_TZname, buf, sizeof (lcl_TZname));
+ setenv("TZ", lcl_TZname, 1);
return;
}
}