local match kickoff time
- by Usagi Dreamy
I'm working on a sports website and need to convert the server's match start time to local match start time.
After much googling, I figured the fastest and most accurate way is to get the GMT offset value in JavaScript. The trouble is, I can't pass the GMT offset value to PHP. I've tried using both the PHP session and cookie variables, but both are always empty. The website doesn't require a user account, so there isn't any stored GMT value in the database.
I'm trying to auto-detect each user's local timezone every time he/she visits the website, and then calculate the local match start time based on the timezone offset. Can someone please advise me? Thanks.