|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63190 IntlDateFormatter::format loose a year on 2012 Jan
Submitted: 2012-09-30 09:44 UTC Modified: 2013-06-09 22:16 UTC
Avg. Score:4.0 ± 0.7
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: dpmancus at gmail dot com Assigned: cataphract (profile)
Status: Not a bug Package: intl (PECL)
PHP Version: Irrelevant OS: linux
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: dpmancus at gmail dot com
New email:
PHP Version: OS:


 [2012-09-30 09:44 UTC] dpmancus at gmail dot com
$a= \DateTime::createFromFormat('Y-m-d H:i:s', '2012-01-01 10:56:31');

$formatter = new IntlDateFormatter(
            'd-MMMM-Y H:m:s'

echo "\ndate: " . date('d-m-Y H:i:s', $a->getTimestamp()) . "\n";
echo "formatter: " . $formatter->format($a->getTimestamp()) . "\n\n";

Expected result:
date: 01-01-2012 11:55:38
formatter: 1-gennaio-2012 10:55:38

Actual result:
date: 01-01-2012 11:55:38
formatter: 1-gennaio-2011 10:55:38


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-30 09:51 UTC] dpmancus at gmail dot com
please do not worry about time, i've copied from terminal the result of the 
attempt with that time(10:55:38)
 [2012-10-04 03:35 UTC]
-Assigned To: +Assigned To: cataphract
 [2013-06-09 22:16 UTC]
-Status: Assigned +Status: Not a bug
 [2013-06-09 22:16 UTC]
"Y" means year of "week of year" purposes. You mean "y". See the table on
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 10:01:29 2024 UTC