php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37625 strftime()/gmstrftime() error
Submitted: 2006-05-29 10:53 UTC Modified: 2006-05-29 11:14 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: webmaster at keenan dot dk Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.4.2 OS: Linux
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: webmaster at keenan dot dk
New email:
PHP Version: OS:

 

 [2006-05-29 10:53 UTC] webmaster at keenan dot dk
Description:
------------
the function strftime() outputs the wrong year
when the timestamp is from january 1st 2006.

Reproduce code:
---------------
setlocal("LC_TIME","da_DK");
$dstr = strftime("%A den %e. %B %G",mktime(20,0,0,1,1,2006));
echo $dstr;

Expected result:
----------------
s?ndag den 1. januar 2006

Actual result:
--------------
s?ndag den 1. januar 2005

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-29 11:14 UTC] tony2001@php.net
%G - The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead.

http://php.net/strftime
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 03 05:00:01 2025 UTC