(Half of bug 33454) The week based year number (format char 'o') was being calculated...
authorBrian Wolff <bawolff@users.mediawiki.org>
Mon, 2 Jan 2012 08:20:03 +0000 (08:20 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Mon, 2 Jan 2012 08:20:03 +0000 (08:20 +0000)
This would cause a couple incorrect results on new years day.

RELEASE-NOTES-1.19
languages/Language.php

index 5855e3e..32d35a3 100644 (file)
@@ -209,6 +209,8 @@ production.
   prevent inheritance to nested tables which caused various issues
 * (bug 32686) Tooltip on links to non-existing pages are now always in user's
   language
+* (bug 33454) ISO-8601 week-based year number (format character 'o') is now
+  calculated correctly with respect to timezone
 
 === API changes in 1.19 ===
 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
index 7b8d8aa..b204626 100644 (file)
@@ -1045,7 +1045,7 @@ class Language {
                                        if ( !$unix ) {
                                                $unix = wfTimestamp( TS_UNIX, $ts );
                                        }
-                                       $num = date( 'o', $unix );
+                                       $num = gmdate( 'o', $unix );
                                        break;
                                case 'Y':
                                        $num = substr( $ts, 0, 4 );