php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35958 strftime does not calculate time correct anymore
Submitted: 2006-01-10 09:40 UTC Modified: 2006-01-10 20:01 UTC
From: magnuswillner at hotmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.4.1 OS: Unix
Private report: No CVE-ID: None
 [2006-01-10 09:40 UTC] magnuswillner at hotmail dot com
Description:
------------
Hello!
The function strftime doesn't work correct anymore.
Effect: 
Critical, since all the business critical booking system for all customers is malfunctioning completely.

Since: 
The problem started around 2006-01-07/08. (Known working 2006-01-06 for sure)

Problem description: 
See http://www.logibook.com/a/strftime_test.php for an desciptive page over the error. 
strftime usually returns a string from the number of seconds since 1 jan 1970. Now, it lags and returns a string representing 23 seconds to late. When I look at bookings further on in the future, the function lags 24 seconds.

Other: 
My webb-hotell (www.swedenet.net) uses cpanel. Cpanel seems to not support a later version of php than 4.4.1. Is the problem solved in a later version of php and in that case, in what earliest version is it solved?


Reproduce code:
---------------
See http://www.logibook.com/a/strftime_test.php

Expected result:
----------------
see text when running the file: http://www.logibook.com/a/strftime_test.php

E.g. The strftime should return 8 jan 2006, 08:00:00

Actual result:
--------------
see text when running the file: http://www.logibook.com/a/strftime_test.php

E.g. The strftime should return 8 jan 2006, 07:59:37 which is incorrect.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-10 09:46 UTC] derick@php.net
This is a problem with your webhost. They probably updated their timezone database but did it wrong. The 22 seconds come from the difference between UT and UTC, and in Jan 1st 2006 we had another leap second making this 23 seconds. You can see the difference here (right is the one with leapsecond support):

derick@kossu:/usr/share/zoneinfo$ TZ=Europe/Amsterdam date; TZ=right/Europe/Amsterdam date
Tue Jan 10 09:46:25 CET 2006
Tue Jan 10 09:46:02 CET 2006

 [2006-01-10 20:01 UTC] derick@php.net
It seems your webhost did something as it is working now (on the test URL). What did they do?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 01:01:29 2024 UTC