|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 15:01:33 2024 UTC