CVS update: php3/functions

From: Date: Sun, 27 Dec 1998 07:57:43 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-3062@lists.php.net to get a copy of this message
Date: Sunday December 27, 1998 @ 2:57 Author: sas Update of /repository/php3/functions In directory asf:/u/temp/cvs-serv11286/functions Modified Files: datetime.c Log Message: fix for #994 tm_gmtoff is only field in, if we use localtime() since the offset from the GMT time to the GMT time will always be 0. Index: php3/functions/datetime.c diff -c php3/functions/datetime.c:1.43 php3/functions/datetime.c:1.44 *** php3/functions/datetime.c:1.43 Tue Sep 22 10:34:07 1998 --- php3/functions/datetime.c Sun Dec 27 02:57:42 1998 *************** *** 30,36 **** */ ! /* $Id: datetime.c,v 1.43 1998/09/22 14:34:07 zeev Exp $ */ #ifdef THREAD_SAFE --- 30,36 ---- */ ! /* $Id: datetime.c,v 1.44 1998/12/27 07:57:42 sas Exp $ */ #ifdef THREAD_SAFE *************** *** 97,114 **** convert_to_long(arguments[i]); } t=time(NULL); - if (gm) { - tn = gmtime(&t); #if HAVE_TZSET ! tzset(); #if HAVE_TM_ZONE gmadjust=(tn->tm_gmtoff)/3600; #else gmadjust=timezone/3600; #endif - #endif - } else { - tn = localtime(&t); } memcpy(&ta,tn,sizeof(struct tm)); ta.tm_isdst = -1; --- 97,112 ---- convert_to_long(arguments[i]); } t=time(NULL); #if HAVE_TZSET ! tzset(); ! #endif ! tn = localtime(&t); ! if (gm) { #if HAVE_TM_ZONE gmadjust=(tn->tm_gmtoff)/3600; #else gmadjust=timezone/3600; #endif } memcpy(&ta,tn,sizeof(struct tm)); ta.tm_isdst = -1; -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3062) next »