Jump to content

appointment calendar website - is it possible to ignore the timezone?


gunter
 Share

Recommended Posts

let´s think about an appointment scheduling website...
It´s about meeting personally - making an appointment with the hairdresser, massage therapist...
is it possible to ignore the timezone? Is it possible to store an appointment (10:00 till 11:00) so it is saved and viewable forever correctly, even if the server time setting is wrong?
And just using the timezone to decide when a reminder email has to be sent?

Once I was invited by friend from another country who made an facebook event to meet during his travel in my town with some friends... at 6 pm... and then there was nobody there because they real beginning was at 7 pm... because he was in another timezone when he created the event and facebook thought... ah... different timezone... lets subtract an hour to the beginning of the event... *

Link to comment
Share on other sites

You're talking about wall-time. To be really save for future dates you need to store not only the datetime (UTC) + timezone, but also the wall time. There are changes in timezones multiple times per year and some are even countries changing how their timezones work. If you have both UTC and wall-time you can detect such changes and react accordingly. The UTC time you need as soon as you need to compare / act on times, which are in multiple timezones, you need to interact with some APIs or export .ics calendar files. So for your examples it might be fine to disregard the timezone and only use wall-time.

Here's some more information on why timezones are hard: https://zachholman.com/talk/utc-is-enough-for-everyone-right
I've also found this to be a good blog with a bit more actionable advice: http://www.creativedeletion.com/

  • Like 7
  • Thanks 1
Link to comment
Share on other sites

Are you using normally just strtotime and time for your date/time calculations???? Because pw uses them for the datetime fieldtype? Or addionally the datetime class? * Because I just made a small calendar module, which uses datetime... but now I´m thinking about, if this was a good idea...

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...