Make WordPress Core

Opened 22 years ago

Closed 20 years ago

#136 closed defect (bug) (duplicate)

Month changeover in Calendar does not use gm offset

Reported by: anonymousbugger Owned by: matt
Priority: normal Milestone:
Component: General Version: 2.0.4
Severity: minor Keywords: calendar month
Cc: Focuses:

Description

Change History (5)

#2 @matt
22 years ago

  • Patch → No
  • Status new → assigned

This appears to be fixed in the current code, could anyone confirm if they still experience this?

#3 @matt
22 years ago

  • fixed_in_version → 1.5
  • Owner changed from anonymous to matt
  • Resolution 10 → 20
  • Status assigned → closed

#4 @thermoman
20 years ago

  • Keywords calendar month added
  • Resolution fixed
  • Status closed → reopened
  • Version → 2.0.4

See ​http://wordpress.org/support/topic/13874

My calendar is 1 day ahead and i fixed it using this diff:

--- wp-includes/template-functions-general.php.orig     2006-07-31 22:55:03.000000000 +0200
+++ wp-includes/template-functions-general.php  2006-07-31 22:55:10.000000000 +0200
@@ -433,8 +433,8 @@
                else
                                $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
        } else {
-               $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
-               $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);
+               $thisyear = gmdate('Y', current_time('timestamp'));
+               $thismonth = gmdate('m', current_time('timestamp'));
        }

        $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);

#5 @Nazgul
20 years ago

  • Resolution → duplicate
  • Status reopened → closed

Duplicate of #2189

Note: See TracTickets for help on using tickets.