2005-01-19 Shaun Jackman <sjackman@gmail.com>

* libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
        environment variable is set.
This commit is contained in:
Jeff Johnston 2005-01-20 17:31:04 +00:00
parent 1a0b5b8e6c
commit 524298079c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-01-19 Shaun Jackman <sjackman@gmail.com>
* libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
environment variable is set.
2005-01-19 Shaun Jackman <sjackman@gmail.com>
* tzset_r.c (_tzname): Add a comma.

View File

@ -122,7 +122,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
ENV_UNLOCK;
/* if we are setting the TZ environment variable, update timezone info */
if (strcmp (name, "TZ") == 0)
if (strncmp ((*p_environ)[offset], "TZ=", 3) == 0)
tzset ();
return 0;