local match kickoff time
        Posted  
        
            by 
                Usagi Dreamy
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Usagi Dreamy
        
        
        
        Published on 2011-11-16T09:20:29Z
        Indexed on 
            2011/11/16
            17:51 UTC
        
        
        Read the original article
        Hit count: 314
        
php
|JavaScript
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.
© Stack Overflow or respective owner