Re: [PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Vladimir Zidar
On Mon, 2004-11-15 at 18:37, Derick Rethans wrote: > On Mon, 15 Nov 2004, Vladimir Zidar wrote: > > > But then whole function php_mktime() is wrong, as in case where gm=1, > > you expect that parameters you pass are GMT, and still you fill defaults > > with localtime. Also, later, if gm=1, timezo

Re: [PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Derick Rethans
On Mon, 15 Nov 2004, Vladimir Zidar wrote: > But then whole function php_mktime() is wrong, as in case where gm=1, > you expect that parameters you pass are GMT, and still you fill defaults > with localtime. Also, later, if gm=1, timezone adjustment is in use, but > with parameters that are in GM

Re: [PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Vladimir Zidar
But then whole function php_mktime() is wrong, as in case where gm=1, you expect that parameters you pass are GMT, and still you fill defaults with localtime. Also, later, if gm=1, timezone adjustment is in use, but with parameters that are in GMT. So the real good fix would be to remove timezon

Re: [PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Derick Rethans
On Mon, 15 Nov 2004, Vladimir Zidar wrote: > So the fix is easy: > > --- ext/standard/datetime.c.origFri Nov 12 22:35:04 2004 > +++ ext/standard/datetime.c Fri Nov 12 22:35:33 2004 > @@ -256,7 +256,7 @@ > gmadjust = -(is_dst ? timezone - 3600 : timezone); > #endif > #end

Re: [PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Antony Dovgal
On Mon, 15 Nov 2004 16:04:46 +0100 Vladimir Zidar <[EMAIL PROTECTED]> wrote: > If anybody cares, > > gmmktime returning completly bogus results. It can be easly checked > out by manually setting TZ shell variable. > > Lets try it like this: > > TZ=GMT+1 php -r "echo gmmktime();" > > gives 1100

[PHP-DEV] Fix for php4 bug #30096

2004-11-15 Thread Vladimir Zidar
If anybody cares, gmmktime returning completly bogus results. It can be easly checked out by manually setting TZ shell variable. Lets try it like this: TZ=GMT+1 php -r "echo gmmktime();" gives 1100292805 TZ=GMT+2 php -r "echo gmmktime();" gives 1100289207 TZ=GMT+3 php -r "echo gmmktime();"

[PHP-DEV] Fix for php4 bug #30096

2004-11-12 Thread Vladimir Zidar
If anybody (derick?) cares, gmmktime returning completly bogus results. It can be easly checked out by manually setting TZ shell variable. Lets try it like this: TZ=GMT+1 php -r "echo gmmktime();" gives 1100292805 TZ=GMT+2 php -r "echo gmmktime();" gives 1100289207 TZ=GMT+3 php -r "echo gmmk