CVS update: php3/functions
| From: | jim | Date: | Mon, 21 Jun 1999 00:54:01 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7296@lists.php.net to get a copy of this message | ||
Date: Sunday June 20, 1999 @ 20:54
Author: jim
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv10443/functions
Modified Files:
datetime.c
Log Message:
Add another parameter to mktime() to allowing setting the is_dst field.
Index: php3/functions/datetime.c
diff -u php3/functions/datetime.c:1.64 php3/functions/datetime.c:1.65
--- php3/functions/datetime.c:1.64 Sun Jun 20 13:14:05 1999
+++ php3/functions/datetime.c Sun Jun 20 20:54:01 1999
@@ -30,7 +30,7 @@
*/
-/* $Id: datetime.c,v 1.64 1999/06/20 17:14:05 jim Exp $ */
+/* $Id: datetime.c,v 1.65 1999/06/21 00:54:01 jim Exp $ */
#ifdef THREAD_SAFE
@@ -90,13 +90,13 @@
void _php3_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
- pval *arguments[6];
+ pval *arguments[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) {
+ if (arg_count > 7 || getParametersArray(ht, arg_count, arguments) == FAILURE) {
WRONG_PARAM_COUNT;
}
/* convert supplied arguments to longs */
@@ -114,7 +114,11 @@
else
ta.tm_isdst = -1;
+ if (arg_count > 6)
+ ta.tm_isdst = arguments[6]->value.lval;
+
switch(arg_count) {
+ case 7:
case 6:
ta.tm_year = arguments[5]->value.lval - ((arguments[5]->value.lval > 1000) ? 1900 : 0);
/* fall-through */