comet-cache icon indicating copy to clipboard operation
comet-cache copied to clipboard

Feature Request: Option to Select Timezone.

Open renzms opened this issue 8 years ago • 6 comments

It would be nice if a user had the option to use the local server's timezone or had an option to select a timezone. For example, using GMT timezones since the current timezone in the plugin is only UTC.


Referencing Internal ticket: https://secure.helpscout.net/conversation/376029653/1351/

renzms avatar Jun 06 '17 08:06 renzms

Thank you.

CyberCr33p avatar Jun 06 '17 08:06 CyberCr33p

What part of Comet Cache is this referring to? Comet Cache is a WordPress plugin and uses the WordPress date/time settings in Dashboard → Settings → General.

raamdev avatar Jun 06 '17 22:06 raamdev

The time in the footer of the page:

Cache File Version Salt: n/a

Cache File URL: http://www.xxx.gr/ Cache File Path: /cache/comet-cache-xxx/cache/http/www-xxx-gr/index.html

Cache File Generated Via: HTTP request Cache File Generated On: Jun 9th, 2017 @ 9:22 am UTC Cache File Generated In: 1.42426 seconds

Cache File Expires On: Jun 16th, 2017 @ 9:22 am UTC Cache File Auto-Rebuild On: Jun 16th, 2017 @ 9:22 am UTC

Loaded via Cache On: Jun 9th, 2017 @ 9:24 am UTC Loaded via Cache In: 0.01759 seconds

CyberCr33p avatar Jun 09 '17 09:06 CyberCr33p

@CyberCr33p Ah, I see. Thank you for explaining. Yes, I agree those timestamps should follow whatever your WordPress timezone settings are set to. I'll mark this as an accepted feature request.

raamdev avatar Jun 09 '17 21:06 raamdev

@jaswrks It sounds like this might be tricky given the fact that the cache file is served before the rest of WordPress is loaded, which means we can use the usual method of retrieving the timezone info set in WordPress. Thoughts?

raamdev avatar Jun 09 '17 21:06 raamdev

That is correct, yes. Too early to query the database. So to do this it would require saving the configured timezone and hard-coding it into the advanced-cache.php file in the form of a constant perhaps.

jaswrks avatar Jun 09 '17 22:06 jaswrks