Title: [Plugin: Post Expirator] Daylight Saving Time problem (?)
Last modified: August 19, 2016

---

# [Plugin: Post Expirator] Daylight Saving Time problem (?)

 *  [neuromancer](https://wordpress.org/support/users/kokkorascsdauthgr/)
 * (@kokkorascsdauthgr)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/)
 * I am setting an expire time of, say, 17 (in 24 hour format) and the WP displays
   it as 15 in all other places. 17 is displayed only in the Edit Post page, in 
   the Post Expirator panel.
 * I am posting from Greece. We are in Daylight Saving time. Is this related to 
   the problem?
 * [http://wordpress.org/extend/plugins/post-expirator/](http://wordpress.org/extend/plugins/post-expirator/)

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/page/2/?output_format=md)

 *  Thread Starter [neuromancer](https://wordpress.org/support/users/kokkorascsdauthgr/)
 * (@kokkorascsdauthgr)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1370687)
 * More details….
 * The plug in works ok with WP 2.9.1 There is only one issue:
 * Say that I am setting a post to expire at 17, using the Expirator panel in the
   Edit Post page. Then I go to the Posts page where it says that the post expires
   at 15. The same (15) is displayed in all over the WP. Only the Expirator Panel
   in the Edit Post page dispays the time set.
 * The good thing is that the plug-in do works. The post expires at 17, not 15.
 * It looks like WP do not dispay the expiration time properly but I am not sure
   if this is a WP issue. I still believe that it is related to the daylight saving
   time – that’s why the 2 hour difference.
 *  [smalltide](https://wordpress.org/support/users/smalltide/)
 * (@smalltide)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1370991)
 * I am running 2.9.2. Expirator appears to work, but I’m going to do some more 
   testing to be positive.
 * However, I noted a similar problem with the post expiration hour. It appears 
   to follow UTC time, regardless of the WP setting for UTC (I am UTC-5). If Greece
   is UTC+2, that would explain your issue as well.
 * Until there is a fix (was this always a problem, or just with recent WP versions?),
   I think our solution is to base our desired expiration on UTC time, e.g. if I
   want 18 Eastern US, I have to set it as 23. For 18 in Greece, it would be 16.
 *  [Aaron Axelsen](https://wordpress.org/support/users/axelseaa/)
 * (@axelseaa)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371002)
 * I just released a new version that uses the same timezone as configured in the
   blog. It also fixes a few other compatibility issues.
 *  [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * (@feedmeastraycat)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371022)
 * I have 1.4 (with WP3) and it had Post expires at 8:00am on Wednesday July 7th,
   2010 but expired at 10:00am. So the timezone/dst thingy seams to be there still.
 *  [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * (@feedmeastraycat)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371023)
 * More info:
 * I had UTC+1 as my timezone on my blog (Im In sweden). But that doesnt take DST
   into account.
 * So with UTC+1 I got:
    UTC time is 2010-07-07 12:50:42 Local time is 2010-07-07
   13:50:42 (one hour wrong)
 * But I changed and choosed Stockholm as my timezone instead. (Not sure when this
   feature was introduced in WP, dont think I have seen it before. Maybe its a WP3
   thing?)
 * So with Stockholm timezone I got:
    TC time is 2010-07-07 12:52:49 Local time 
   is 2010-07-07 14:52:49 (correct!)
 * So when I created a post, or edited an old post, the default time for Post Expirator
   was correct. But if I enable the post footer i still get the wrong timezone time.
 * So I choose 14:50 today as expire date, but I get:
    “Post expires at 12:50pm 
   on Wednesday July 7th, 2010”
 * Gonna test and see if the actual time where it expires still is wrong.
 *  [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * (@feedmeastraycat)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371024)
 * The post expired. So its only the output time that is wrong for me now. After
   I have changed my timezone to a city based timezone. 🙂 I guess that when you
   choose UTC+1 WP just adds 1 hour. But when you choose Stockholm it also corrects
   for DST.
 * So the only patch this plugin currently needs is output correction. 🙂 It seams.
 *  [feedmeastraycat](https://wordpress.org/support/users/feedmeastraycat/)
 * (@feedmeastraycat)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371025)
 * You can add:
 *     ```
       $expirationdatets += get_option( 'gmt_offset' ) * 3600;
       ```
   
 * in postexpirator_add_footer(). Just after:
 *     ```
       $expirationdatets = get_post_meta($post->ID,'expiration-date',true);
       if (!is_numeric($expirationdatets))
       	return $text;
       ```
   
 * Seams to be a good fix… 🙂
 * You could also check the config page, where you can enter date and time format.
   Thise code:
 *     ```
       (<?php echo date("$expirationdateDefaultDateFormat") ?>)
       ```
   
 * Could instead be this:
 *     ```
       (<?php echo date("$expirationdateDefaultDateFormat", current_time('timestamp')) ?>)
       ```
   
 * _(If you use “c” as a date format it will output +00:00 as a timezone. But thats
   more of a WP thing than the plugin.)_
 * Ok. Thats all from me. 🙂
 *  [semrocc](https://wordpress.org/support/users/semrocc/)
 * (@semrocc)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371039)
 * Ok…I tried both suggestions and neither of them worked, do you have any other
   ideas?
 * It would be great to hear from the developer as well on this topic.
 * Thanks
 *  [semrocc](https://wordpress.org/support/users/semrocc/)
 * (@semrocc)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371041)
 * Can anyone help on this…?
 *  [semrocc](https://wordpress.org/support/users/semrocc/)
 * (@semrocc)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371053)
 * Still looking for a fix that I can get to work…anyone?
 * I’m out 5 hours no matter what I do.
 *  [physalis](https://wordpress.org/support/users/physalis/)
 * (@physalis)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371061)
 * Same here. The config page still shows the wrong date.
    Is the plugin actually
   working, since it seemed to have no effect. May have been a conflict with the
   time zone stuff…
 *  [semrocc](https://wordpress.org/support/users/semrocc/)
 * (@semrocc)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371062)
 * The plugin still works for me, though it does delete it 5 hours earlier than 
   its supposed to, the exact time that it shows on the plugin config page.
 *  [physalis](https://wordpress.org/support/users/physalis/)
 * (@physalis)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371063)
 * Anyone tried the change-to-draft function, does that work? In my case it doesn’t
   seem to… though this is what I really need^^.
 *  [physalis](https://wordpress.org/support/users/physalis/)
 * (@physalis)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371067)
 * *Cough* Anyone? Do you all use the delete function and it works as expected?
 *  [semrocc](https://wordpress.org/support/users/semrocc/)
 * (@semrocc)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/#post-1371068)
 * I use the draft function and works as expected…though 5 hours earlier than it
   should.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/page/2/?output_format=md)

The topic ‘[Plugin: Post Expirator] Daylight Saving Time problem (?)’ is closed 
to new replies.

 * 21 replies
 * 7 participants
 * Last reply from: [semrocc](https://wordpress.org/support/users/semrocc/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-post-expirator-daylight-saving-time-problem/page/2/#post-1371088)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
