Jump to content

timezone


CpHpristian

Recommended Posts

You would either need to get the user to supply you with his timezone when he registers, which you store as a setting in your user table (the way most forums do it) or if your user has javascript enabled, you can use AJAX techniques to get his timezone information to the server.

 

If you just want to display a server's date/time value in the browser in the user's timezone, you could send the date/time value and the server's timezone to the browser and use javascript to calculate when that date/time would be in the visitor's timezone using the difference between the visitor's timezone and the server's timezone.

 

What exactly are you trying to accomplish?

Link to comment
https://forums.phpfreaks.com/topic/162135-timezone/#findComment-855570
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.