Title: Change html timestamp timezone
Last modified: May 28, 2021

---

# Change html timestamp timezone

 *  Resolved [pepin0x](https://wordpress.org/support/users/pepin0x/)
 * (@pepin0x)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-html-timestamp-timezone/)
 * Hello.
    How could I sync cache enabler html comment timestamp with my current
   timezone?
 * **<!– Cache Enabler by KeyCDN @ Fri, 28 May 2021 00:11:58 GMT (https-index.html)–
   >**
 * I think my server config (GMT +2) is fine:
 * date ; php -r “echo date(‘r’).PHP_EOL;” ; mysql -e “SELECT NOW();”
    Fri May 28
   02:12:09 CEST 2021 Fri, 28 May 2021 02:12:09 +0200 +———————+ | NOW() | +———————
   + | 2021-05-28 02:12:09 |
 * Cache enabler timestamp is -2hours.
    Btw, I use nginx.
 * Thanks!
    -  This topic was modified 5 years, 2 months ago by [pepin0x](https://wordpress.org/support/users/pepin0x/).
    -  This topic was modified 5 years, 2 months ago by [pepin0x](https://wordpress.org/support/users/pepin0x/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Anonymous User 16850768
 * (@anonymized-16850768)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-html-timestamp-timezone/#post-14495546)
 * In version 1.7.0 this was changed to be in the HTTP-date format, which is required
   to be in GMT.
 * The only way to currently change this to your local time zone would be to fork
   the plugin and make changes to the [`Cache_Enabler_Disk::get_current_time()`](https://github.com/keycdn/cache-enabler/blob/60b819424188dae8b9ec4593c0064ff78f507bab/inc/cache_enabler_disk.class.php#L1032-L1046)
   method.
 * I’ve went ahead and added this request to our list to potentially add a filter
   hook here for customization.
 *  Thread Starter [pepin0x](https://wordpress.org/support/users/pepin0x/)
 * (@pepin0x)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-html-timestamp-timezone/#post-14495903)
 * Hello.
 * line 825 from
    `$current_time = current_time( 'D, d M Y H:i:s', true ) . ' GMT';`
   to `$current_time = current_time( 'D, d M Y H:i:s');` so timestamp is adjusted
   with the GMT offset in the WordPress option. I don’t know if it’s the best approach
   because I don’t code (but I can read google lol) but looks good for me and works:
   P.
 * Thanks for the tip!
 * PD: [current_time() | Function | WordPress Developer Resources](https://developer.wordpress.org/reference/functions/current_time/)
 *  Anonymous User 16850768
 * (@anonymized-16850768)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/change-html-timestamp-timezone/#post-14503585)
 * You’re welcome! Happy to have been able to help.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change html timestamp timezone’ is closed to new replies.

 * ![](https://ps.w.org/cache-enabler/assets/icon.svg?rev=2442383)
 * [Cache Enabler](https://wordpress.org/plugins/cache-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-enabler/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [timestamp](https://wordpress.org/support/topic-tag/timestamp/)
 * [timezone](https://wordpress.org/support/topic-tag/timezone/)

 * 3 replies
 * 2 participants
 * Last reply from: Anonymous User 16850768
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/change-html-timestamp-timezone/#post-14503585)
 * Status: resolved