Title: Setting the expiration date programmatically
Last modified: August 31, 2016

---

# Setting the expiration date programmatically

 *  [feed_sheep](https://wordpress.org/support/users/feed_sheep/)
 * (@feed_sheep)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/setting-the-expiration-date-programmatically/)
 * Hi,
 * I’m trying to set _cs-enable-schedule and _cs-expire-date programmatically, but
   when I check the post, it is not displaying that it is set. I’m not sure if I’m
   doing something wrong or what.
 * For the first custom value, I have “Enable”. For the second I have “2016-05-02
   00:00:00”. No quotes, of course.
 * [https://wordpress.org/plugins/content-scheduler/](https://wordpress.org/plugins/content-scheduler/)

Viewing 1 replies (of 1 total)

 *  [alien8](https://wordpress.org/support/users/alien8/)
 * (@alien8)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/setting-the-expiration-date-programmatically/#post-7329983)
 * I’ve been playing with this recently as well and it looks like somewhere down
   the road between versions the required datetime format changed from a string 
   that looks like “YYYY-MM-DD HH:MM:SS” to an epoch value (the number of seconds
   since Jan 01, 1970 00:00:00 UTC)
 * I’m having issues with timezone support (CS is converting all my input to UTC
   despite it being input in my local timezone) but hopefully this will help you.

Viewing 1 replies (of 1 total)

The topic ‘Setting the expiration date programmatically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/content-scheduler_e7ddf8.svg)
 * [Content Scheduler](https://wordpress.org/plugins/content-scheduler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-scheduler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-scheduler/)
 * [Active Topics](https://wordpress.org/support/plugin/content-scheduler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-scheduler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-scheduler/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [alien8](https://wordpress.org/support/users/alien8/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/setting-the-expiration-date-programmatically/#post-7329983)
 * Status: not resolved