CVS update: php3/functions

From: Date: Tue, 15 Jun 1999 12:45:22 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-6985@lists.php.net to get a copy of this message
Date: Tuesday June 15, 1999 @ 8:45 Author: sas Update of /repository/php3/functions In directory php:/tmp/cvs-serv4449 Modified Files: datetime.c Log Message: make this also cover minutes Index: php3/functions/datetime.c diff -u php3/functions/datetime.c:1.61 php3/functions/datetime.c:1.62 --- php3/functions/datetime.c:1.61 Tue Jun 15 08:28:24 1999 +++ php3/functions/datetime.c Tue Jun 15 08:45:22 1999 @@ -30,7 +30,7 @@ */ -/* $Id: datetime.c,v 1.61 1999/06/15 12:28:24 rasmus Exp $ */ +/* $Id: datetime.c,v 1.62 1999/06/15 12:45:22 sas Exp $ */ #ifdef THREAD_SAFE @@ -94,6 +94,7 @@ struct tm ta, *tn; time_t t; int i, gmadjust=0,arg_count = ARG_COUNT(ht); + int gmadjust_min = 0, gmadjust_hour = 0; if (arg_count > 6 || getParametersArray(ht, arg_count, arguments) == FAILURE) { WRONG_PARAM_COUNT; @@ -137,13 +138,16 @@ if (gm) { #if HAVE_TM_GMTOFF - gmadjust=(tn->tm_gmtoff)/3600; + gmadjust=tn->tm_gmtoff; #else - gmadjust=timezone/3600; + gmadjust=timezone #endif - } + gmadjust_hour = gmadjust / 3600; + gmadjust_min = gmadjust - gmadjust_hour * 3600; - ta.tm_hour+=gmadjust; + ta.tm_hour += gmadjust_hour; + ta.tm_min += gmadjust_min; + } return_value->value.lval = mktime(&ta); return_value->type = IS_LONG;

« previous php.dev (#6985) next »