|  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
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
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.
Block user comment
Status: Assign to:
Bug Type:
From: fjbaozi at gmail dot com
New email:
PHP Version: OS:


 [2015-01-05 07:41 UTC] fjbaozi at gmail dot com
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)


Add a Patch

Pull Requests

Add a Pull Request


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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jan 27 15:03:46 2023 UTC