cvs: /php4/ext/standard datetime.c
| From: | Sterling Hughes | Date: | Mon, 27 Mar 2000 18:12:04 +0000 |
| Subject: | cvs: /php4/ext/standard datetime.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12681@lists.php.net to get a copy of this message | ||
sterling Mon Mar 27 10:12:04 2000 EDT
Modified files:
/php4/ext/standard datetime.c
Log:
Slight change for time on the return side.
@-Added 'I' switch to test whether or not DST is active.
Index: php4/ext/standard/datetime.c
diff -u php4/ext/standard/datetime.c:1.32 php4/ext/standard/datetime.c:1.33
--- php4/ext/standard/datetime.c:1.32 Sun Mar 12 07:47:32 2000
+++ php4/ext/standard/datetime.c Mon Mar 27 10:11:33 2000
@@ -19,7 +19,7 @@
*/
-/* $Id: datetime.c,v 1.32 2000/03/12 15:47:32 sas Exp $ */
+/* $Id: datetime.c,v 1.33 2000/03/27 18:11:33 sterling Exp $ */
#include "php.h"
@@ -69,8 +69,7 @@
PHP_FUNCTION(time)
{
- return_value->value.lval = (long) time(NULL);
- return_value->type = IS_LONG;
+ RETURN_LONG((long)time(NULL));
}
void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
@@ -270,6 +269,7 @@
size += 3;
break;
case 'w': /* day of the week, numeric */
+ case 'I': /* DST? */
default:
size++;
break;
@@ -418,6 +418,10 @@
((((long)the_time) % 86400) + 3600))) * 10) / 864);
if (beat > 999) beat = 0;
sprintf(tmp_buff, "%03d", beat); /* SAFE */
+ strcat(return_value->value.str.val, tmp_buff);
+ break;
+ case 'I':
+ sprintf(tmp_buff, "%d", ta->tm_isdst);
strcat(return_value->value.str.val, tmp_buff);
break;
default: