janssen
1
Hello,
I’m having trouble with overriding the page time zone using the date/time picker. My page is set to CST but my time picker is set to a dynamic time zone. As you can see on the below screenshot, I’m selecting September 25 which should be in Asia/Singapore time zone. But the value being saved is still in CST (a day behind)

Is this a bug?
The date/time appears to be saving correctly.
The debugger will always show dates/times in your system local time (which presumably is CST).
25th September 00:00 in Asia/Singapore time is 24th September 11:00 in CST
So the date/time is being saved correctly here.
janssen
3
No I’m in Asia. So if what you said is true, then the debugger should display the same value as the date picker.
With that said, i am assuming the debugger is using the page time zone which is set to CST which should be overridden by the date picker time zone, right?
I stand corrected… you’re right… the debugger displays dates/times in the Page timezone, when one is defined.
Which still means the date is saving correctly.
The date has been saved as 25th September 00:00 in Singapore time.
Singapore is 13 hours ahead of CST.
So the saved date/time in CST is 11:00am 24th September.
The debugger is displaying the time in CST (the page timezone) - so it’s displaying the saved date/time correctly.
janssen
5
Thanks for the replies @adamhholmes ! Got it to work now. Time zones really are just confusing to work with.
1 Like
Yep.
Actually, I’d put dealing with /understanding time-zones up there as one of the most complicated/confusing things in all of web development - so much so that many people don’t even realise the complexity until after they notice that the app they’ve built doesn’t work correctly for anyone outside their own timezone, due to the way they’ve dealt with time zones within the app. (or, when the clocks change for DST and suddenly everything breaks).
I’ve seen this a lot on apps like event management, hotel bookings, and project/task management applications, where bookings/weeks/time-slots etc. have to be consistent for all users, across different timezones, and if they aren’t then it throws off the entire thing (hotel rooms being available when they aren’t, weeks being shown with the wrong start-dates, project deadlines having the wrong dates for different users etc.).
So yeah… understanding time zones is definitely not easy.
system
Closed
7
This topic was automatically closed after 70 days. New replies are no longer allowed.