Browse Source

If TZ environment variable is changed call tzset().

# Although man page for tzset() says it should be called automaticly
# by some of the time related functions, IRL this doesn't happen.
# PR: 3977, 4732, 5510, 6972, 7203, 8502, 8609
PHP-4.0.5
foobar 26 years ago
parent
commit
e247b206e0
  1. 3
      ext/standard/basic_functions.c

3
ext/standard/basic_functions.c

@ -1059,6 +1059,9 @@ PHP_FUNCTION(putenv)
if ((ret=putenv(pe.putenv_string))==0) { /* success */
zend_hash_add(&BG(putenv_ht),pe.key,pe.key_len+1,(void **) &pe,sizeof(putenv_entry),NULL);
#ifdef HAVE_TZSET
if(!strncmp(pe.key,"TZ",2)) tzset();
#endif
RETURN_TRUE;
} else {
efree(pe.putenv_string);

Loading…
Cancel
Save