ID:               27719
 Updated by:       [EMAIL PROTECTED]
 Reported By:      schmidt dot a at rogers dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: FreeBSD 4.4
 PHP Version:      5.0.0RC1


Previous Comments:
------------------------------------------------------------------------

[2004-03-26 14:25:25] [EMAIL PROTECTED]

I have committed a fix which uses the 4am offset instead of 2 there
around line 192 in datetime.c.  Any chance you could test that and let
me know if it fixes your problem?

------------------------------------------------------------------------

[2004-03-26 14:00:40] [EMAIL PROTECTED]

I made the changed referenced above to address this bug:

http://bugs.php.net/27533



Perhaps the solution here is to offset it to +3 or +4 instead to get
the baseline timestamp.

------------------------------------------------------------------------

[2004-03-26 13:39:51] schmidt dot a at rogers dot com

Ok I've done some more testing,  FreeBSD mktime will return -1 when
passed in 2 am for the day when clocks are being moved ahead,  since
2am should never exist.



I'm not sure how linux handles this (maybe returns a 3am timestamp).



This coupled with the change to ext/standard/datetime.c line 192+ which
always changes the hour 2am if its 12 or 1 am.  Unfortunatly this has a
bad effect of messing up 12am and 1am for daylight savings days which
are valid hours.



http://cvs.php.net/diff.php/php-src/ext/standard/datetime.c?r1=1.116&r2=1.117&ty=h



I'm not sure what the best solution is,  but I hope this helps.

------------------------------------------------------------------------

[2004-03-26 12:13:44] schmidt dot a at rogers dot com

I tested it out on FreeBSD 5.2.1 and still had the same problem using
the latest snapshot:



[GD:andrew] ~ (1) > uname -a

FreeBSD my.domain 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Mon Feb 23
20:45:55 GMT 2004    
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

[GD:andrew] ~ (2) > php -v

PHP 5.0.0RC2-dev (cgi) (built: Mar 26 2004 12:19:53)

Copyright (c) 1997-2004 The PHP Group

Zend Engine v2.0.0RC2-dev, Copyright (c) 1998-2004 Zend Technologies

[GD:andrew] ~ (3) > php test_mktime.php

Content-type: text/html

X-Powered-By: PHP/5.0.0RC2-dev



-7262

-7262

-7262

------------------------------------------------------------------------

[2004-03-26 11:54:30] schmidt dot a at rogers dot com

I tried it out, and still got the same problem:



[as:andrew] ~/public_html (104) # php -v

PHP 5.0.0RC2-dev (cli) (built: Mar 26 2004 12:00:30)

Copyright (c) 1997-2004 The PHP Group

Zend Engine v2.0.0RC2-dev, Copyright (c) 1998-2004 Zend Technologies

[as:andrew] ~/public_html (105) # php test_mktime.php 

-7262

-7262

-7262

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/27719

-- 
Edit this bug report at http://bugs.php.net/?id=27719&edit=1

Reply via email to