[wp-trac] [WordPress Trac] #17957: wp_reschedule_event & daylight saving

WordPress Trac noreply at wordpress.org
Tue Nov 5 15:08:28 UTC 2013


#17957: wp_reschedule_event & daylight saving
-------------------------+------------------------------
 Reporter:  MattyRob     |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Cron         |     Version:  3.2
 Severity:  normal       |  Resolution:
 Keywords:  needs-codex  |
-------------------------+------------------------------

Comment (by pento):

 attachment:17957.diff​

 So, here's a wildly untested proof of concept that changes cron times when
 DST comes around. Now let's discuss why it's a terrible idea, and we
 should forget I ever wrote this code.

 * WP-cron is not, and should not be treated like a reliable cron system.
 If you want to do things at a specific time, use actual cron.
 * There are probably a bunch of side effects to just changing the cron
 time by an hour. Not as bad as changing the server time by an hour, but
 still pretty bad.
 * People who change their server timezone from UTC are Bad People, and
 deserve to be punished for their transgressions. I briefly considered this
 as an alternate patch:


 {{{
 Index: src/index.php
 ===================================================================
 --- src/index.php       (revision 25998)
 +++ src/index.php       (working copy)
 @@ -1,4 +1,6 @@
  <?php
 +if ( date_default_timezone_get() !== 'UTC' )
 +       exit;
  /**
   * Front to the WordPress application. This file doesn't do anything, but
 loads
   * wp-blog-header.php which does and tells WordPress to load the theme.

 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/17957#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list