Problem:
The issue here is that the user had some custom code below.
add_shortcode('time-date', 'timedate'); function timedate() { date_default_timezone_set( get_post_meta(get_the_ID(), 'wpcf-timezone-select-test')); return date( 'H:i', current_time( 'timestamp' )); }
This takes a location based on the PHP timezone location list below.
https://www.php.net/manual/en/timezones.php
It should render the time at the location that is specified, however the user notices that there is Daylight saving time activated even in countries that don't observe this.
Solution:
The user had set a specific timezone in their wordpress settings to a location that observes Daylight Saving Time. This had the effect that it will offset all the clock location by the DST rules.
To workaround this I would recommend setting your wordpress settings timezone to UTC or GMT with no offsets.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 17 replies, has 2 voices.
Last updated by 5 years, 7 months ago.
Assisted by: Shane.