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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fjbaozi at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC