|  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:
 [2006-01-10 09:40 UTC] magnuswillner at hotmail dot com
The function strftime doesn't work correct anymore.
Critical, since all the business critical booking system for all customers is malfunctioning completely.

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

Problem description: 
See 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.

My webb-hotell ( 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:

Expected result:
see text when running the file:

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

Actual result:
see text when running the file:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-10 09:46 UTC]
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]
It seems your webhost did something as it is working now (on the test URL). What did they do?
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 15:01:32 2015 UTC