WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#136 closed defect (bug) (duplicate)

Month changeover in Calendar does not use gm offset

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

Description

Change History (5)

comment:2 matt9 years ago

  • Patch set to No
  • Status changed from new to assigned

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

comment:3 matt9 years ago

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

comment:4 thermoman8 years ago

  • Keywords calendar month added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to 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);

comment:5 Nazgul8 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Duplicate of #2189

Note: See TracTickets for help on using tickets.