For server side rules, Timed Content does not use UTC.
Also see the screenshots in the plugin description. In a shortcode the timezone will be added like this:
[timed-content-server hide="2013-09-13 20:30:00 America/Chicago"]
The same applies to rules which you use by ID. They also contain a timezone setting.
For client side rules, only date/time will be used as they are in the browser since the shortcode will be interpreted using JavaScript in the browser and thus the local timezone of the client applies.
-
This reply was modified 1 year, 9 months ago by
Arno Welzel.
Adding the timezone to the show/hide parameters works, so problem solved. Though I don’t see that option described anywhere in the plugin description or screenshots at https://ww.wp.xz.cn/plugins/timed-content/, nor do I see the panel that is shown in the screenshots there. My confusion is partly because debug outputs the following at 14:53 EDT:
Current date: 2024-08-20 18:53 +0000
Seems weird it doesn’t just default to WordPress settings timezone, but whatever. Thanks for a quick resolution.
Screenshots are here: https://ww.wp.xz.cn/plugins/timed-content/#screenshots
And server side rules (not shortcodes – rules!) always have a timezone, you can not create them without a timezone setting.
However for a shortcode you have to add the timezone as parameter and this will be done, when you use the shortcode creation tool in a “classic” content block within Gutenberg or using the classic editor.
Anyway – I’ll see what I can do to use the WordPress timezone setting as default when a shortcode does not have a timezone parameter added.
Version 2.90 now uses the WordPress timezone as default for new rules and if the shortcode does not contain a timezone in the show/hide parameters. So you don’t need to update existing shortcodes. Hope this helps.
Very helpful, thank you! Much appreciated.