Hello,
easter_date()
returns a timestamp produced by C's mktime()
.
(ext/calendar/easter.c:111):
Z_LVAL_P(return_value) = mktime(&te);
AFAIK mktime()
(time.h) is different to php's mktime()
as it does not consider
php's timezones, i,e, C's mktime does always return a timestamp of the local
timezone. At least I conclude that from own tests.
PHP's date functions on the other hand interpret the timestamp with respect to
the php (default?) timezone.
This leads to the wrong test results of easter_date.phpt as described in my
posting from 22. Jan.
Regards,
Oliver
Hi Oliver,
Report a bug using bugs.php.net (with a link to the patch diff -up :)
This way it will not get lost in the internals archive.
Hello,
easter_date()
returns a timestamp produced by C'smktime()
.
(ext/calendar/easter.c:111):Z_LVAL_P(return_value) = mktime(&te);
AFAIK
mktime()
(time.h) is different to php'smktime()
as it does not consider
php's timezones, i,e, C's mktime does always return a timestamp of the local
timezone. At least I conclude that from own tests.
PHP's date functions on the other hand interpret the timestamp with respect to
the php (default?) timezone.This leads to the wrong test results of easter_date.phpt as described in my
posting from 22. Jan.Regards,
Oliver
Hello Pierre,
a bug report will be no problem.:)
Regarding a patch: timezone information needs to be accessible from within
ext/calendar/easter.c if I got it right. The easiest way is to call
php_mktime/PHP_FUNCTION(mktime) from within easter_date()
- but is that
possible/allowed/welcome?
Regards,
Oliver
Am Montag, 22. Januar 2007 20:34 schrieb Pierre:
Hi Oliver,
Report a bug using bugs.php.net (with a link to the patch diff -up :)
This way it will not get lost in the internals archive.
Hello,
easter_date()
returns a timestamp produced by C'smktime()
.
(ext/calendar/easter.c:111):Z_LVAL_P(return_value) = mktime(&te);
AFAIK
mktime()
(time.h) is different to php'smktime()
as it does not
consider php's timezones, i,e, C's mktime does always return a timestamp
of the local timezone. At least I conclude that from own tests.
PHP's date functions on the other hand interpret the timestamp with
respect to the php (default?) timezone.This leads to the wrong test results of easter_date.phpt as described in
my posting from 22. Jan.Regards,
Oliver
--
--
Leben ist mehr als ...
<http://www.nak-nrw.de/index.php?id=71
Hello Pierre,
a bug report will be no problem.:)
Regarding a patch: timezone information needs to be accessible from within
ext/calendar/easter.c if I got it right. The easiest way is to call
php_mktime/PHP_FUNCTION(mktime) from withineaster_date()
- but is that
possible/allowed/welcome?
No idea, report a bug and the maintainer will tell you his opinion :)
--Pierre