Edit report at http://bugs.php.net/bug.php?id=53654&edit=1

 ID:                 53654
 Updated by:         ras...@php.net
 Reported by:        benjaminlin1019 at gmail dot com
 Summary:            translate epoch time to wrong date time
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Date/time related
 Operating System:   linux and mac
 PHP Version:        5.3SVN-2011-01-04 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

You are confusing ISO-8601:1988 years and calendar years.  Jan 1, 2011
is actually 

in ISO-8601 year 2010.  You want %Y instead of %G here.


Previous Comments:
------------------------------------------------------------------------
[2011-01-04 19:38:25] benjaminlin1019 at gmail dot com

Description:
------------
---

>From manual page: http://www.php.net/function.strftime#Description

---

$date = strftime("%G-%m-%d", 1293868800 );

print $date . "\n";

output: 2010-01-01 



it should be 2011-01-01

Expected result:
----------------
2011-01-01

Actual result:
--------------
2010-01-01


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53654&edit=1

Reply via email to