php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27860 Bug #21966 is not bogus
Submitted: 2004-04-04 07:45 UTC Modified: 2004-04-04 08:24 UTC
From: john dot j at fphoenix dot co dot uk Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.4 OS: Mac OS X 10.2.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john dot j at fphoenix dot co dot uk
New email:
PHP Version: OS:

 

 [2004-04-04 07:45 UTC] john dot j at fphoenix dot co dot uk
Description:
------------
Bug #21966 does exist in 4.3.4 running on Mac OS X 
10.2.8.  It is directly related to the daylight saving 
time changeover date (28 March 2004 in the UK).  
Presumably this date is different for different locales 
therefore the dates in reproduce code below only 
reproduce the bug in the UK locale.

Reproduce code:
---------------
     <?php 
    {
	echo '<p>27/3/04 = ' . strval(mktime(00,0,0,3,27,2004)) . '</p>';   // 1080345600
	echo '<p>28/3/04 = ' . strval(mktime(0,0,0,3,28,2004)) . '</p>';   // -3662  - should be 108042840
	echo '<p>28/3/04 = ' . strval(mktime(2,0,0,3,28,2004)) . '</p>';   // 1080435600
	echo '<p>29/3/04 = ' . strval(mktime(0,0,0,3,29,2004)) . '</p>';   // 1080514800 
	echo '<p>30/3/04 = ' . strval(mktime(0,0,0,3,30,2004)) . '</p>';   // 1080601200
    } ?>


Expected result:
----------------
On the changeover date, times between midnight and 2 am 
exhibit the bug.  Times from 2 am onwards are correct.

I haven't checked, but I would bet the date in the 
original bug report was the DST changeover date for the 
locale of the person who submitted it.

Actual result:
--------------
27/3/04 = 1080345600

28/3/04 = -3662

28/3/04 = 1080435600

29/3/04 = 1080514800

30/3/04 = 1080601200

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-04 08:24 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

This is fixed already in 4.3.6RC1, download from http://qa.php.net.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 06:01:31 2024 UTC