Jump to content

DST


0v3rload

Recommended Posts

Hi,

 

I am looking for the best solution to handle correct time calculations for different timezones. My server is setup to use GMT + DST (Europe/London.)

 

My scripts work in a similar way as on this forum:

- ask user what their timezone is at account creation time;

- at sign in time fetch from DB time difference from UTC;

- calculate user's local time by adding time difference to server-based one;

 

Now, seeing time on my server already has DST accounted for and that calculating user's local time is only a matter of adding the time difference, I'm not too sure whether times will be calculated correctly for every single timezone on the planet.

 

Have I taken the right approach?

Link to comment
https://forums.phpfreaks.com/topic/49962-dst/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.