php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68747 date('W') bug
Submitted: 2015-01-05 07:41 UTC Modified: 2015-01-05 08:09 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: fjbaozi at gmail dot com Assigned:
Status: Closed Package: date_time (PECL)
PHP Version: 5.5Git-2015-01-05 (Git) OS: Ubuntu 14.04.1 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 + 44 = ?
Subscribe to this entry?

 
 [2015-01-05 07:41 UTC] fjbaozi at gmail dot com
Description:
------------
Sometime,the date('W') result is incorrect.

Test script:
---------------
var_dump(date('Y-m-d H:i:s, W', mktime(0,0,0,12,31,2014)));
var_dump(date('Y-m-d H:i:s, W', mktime(0,0,0,1,1,2015)));

Expected result:
----------------
string '2014-12-31 00:00:00, 53' (length=23)
string '2015-01-01 00:00:00, 53' (length=23)

Actual result:
--------------
string '2014-12-31 00:00:00, 01' (length=23)
string '2015-01-01 00:00:00, 01' (length=23)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-05 08:09 UTC] fjbaozi at gmail dot com
-Status: Open +Status: Closed
 [2015-01-05 08:09 UTC] fjbaozi at gmail dot com
not a bug,I am sorry
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Oct 22 08:01:29 2019 UTC