Possible to calculate localtime based on Country/State?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    Possible to calculate localtime based on Country/State?

    Hi all,

    Does anyone know of a script or package that will allow me to calculate
    the localtime given a country code (and optional state/province for
    US/Canada)? It should factor in daylight saving time when applicable.
    If there are special cases where country + state isn't enough that's ok,
    a solution that's correct 95% of the time would be better than no
    solution at all.

    Thanks much,
    Kevin
  • Richard Levasseur

    #2
    Re: Possible to calculate localtime based on Country/State?


    Kevin wrote:
    Hi all,
    >
    Does anyone know of a script or package that will allow me to calculate
    the localtime given a country code (and optional state/province for
    US/Canada)? It should factor in daylight saving time when applicable.
    If there are special cases where country + state isn't enough that's ok,
    a solution that's correct 95% of the time would be better than no
    solution at all.
    >
    Thanks much,
    Kevin
    In unix i'm fairly sure there is a directory full of different regions
    with files describing the timezones.

    Otherwise, you can probably find a list of states and their timezones
    relatively easily. It wouldn't be hard to hand create a list, either,
    its only, what? 50-60 areas?

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: Possible to calculate localtime based on Country/State?

      Kevin wrote:
      Hi all,
      >
      Does anyone know of a script or package that will allow me to calculate
      the localtime given a country code (and optional state/province for
      US/Canada)?
      <snip>

      May be <http://www.twinsun.com/tz/tz-link.htm>

      --
      <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

      Comment

      Working...