SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict chartahir's Avatar
    Join Date
    Oct 2006
    Location
    Karachi, Pakistan
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Find Country or City Time ..

    Using ip of the client i've got the name of city and country, now i want to find the current time of that city or country,

    How can i do this ?
    chartahir

  2. #2
    SitePoint Addict ALL's Avatar
    Join Date
    Oct 2005
    Location
    South Dakota
    Posts
    215
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    if you can get the zip code i have a database of zips with long/lat, city, state timezone you could match it to the database but you woulnt use javascript. i would just get the timezone of the current user using javascript and send it to the server or whatever like this:

    HTML Code:
    <script type="text/javascript" language="javascript"> 
    <!-- 
    var tzo=(new Date().gettimezoneOffset()/60)*(-1); 
    // --> 
    </script>
    Did I help you?
    You can repay me, support one of my projects (no money needed):
    JavaScript Wiki, Another Web Forum, Paranormal Site

  3. #3
    SitePoint Addict chartahir's Avatar
    Join Date
    Oct 2006
    Location
    Karachi, Pakistan
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    using GeoIP i can get the country name and for some countries the name also, have u used it, can i get the zip code using GeoIP ?
    chartahir

  4. #4
    SitePoint Addict ALL's Avatar
    Join Date
    Oct 2005
    Location
    South Dakota
    Posts
    215
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I dont understand why you posted this in the javascript forum when this is obviously not a javascript question. and why you dont get the timezone from javascript insted.

    Many countries have more than one timezone, so even if you had a list of countries to timezones how would you decifer that?
    Did I help you?
    You can repay me, support one of my projects (no money needed):
    JavaScript Wiki, Another Web Forum, Paranormal Site


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •