Convert windows TimeZone to Java TimeZone

Discussion in 'Java' started by asaf, Sep 10, 2006.

  1. asaf

    asaf Guest

    Hi,
    My application works on a multi tier architecture - web server and
    application server run on different machines.
    I'm trying to get the (remote) MS IIS web server (does not have JRE)
    time zone ID.

    How can I convert the web server Windows time zone ID to a Java time
    zone ID in the application server (runs Java of course)?

    is there any String I can render to a well formed Java time zone ID ?
    Or is the only solution to set a hash set pairs of windows timezone and
    Java time zone id.

    thanks,
    Asaf
    asaf, Sep 10, 2006
    #1
    1. Advertising

  2. asaf wrote:
    >
    > How can I convert the web server Windows time zone ID to a Java time
    > zone ID in the application server (runs Java of course)?
    >

    Do current versions of Windoze use timezones yet? It used to ignore the
    whole thing by running the PC's hardware clock on local time. There's
    presumably some entry on the register or in an .INI file so the
    internationalization applet can remember what was selected last time it
    was run and so the startup code can remember to prompt you when the
    clocks change. However, I've never seen where that might be stored or if
    it bears any resemblance to an ISO time zone code.


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Sep 11, 2006
    #2
    1. Advertising

  3. asaf wrote:
    > My application works on a multi tier architecture - web server and
    > application server run on different machines.
    > I'm trying to get the (remote) MS IIS web server (does not have JRE)
    > time zone ID.
    >
    > How can I convert the web server Windows time zone ID to a Java time
    > zone ID in the application server (runs Java of course)?
    >
    > is there any String I can render to a well formed Java time zone ID ?
    > Or is the only solution to set a hash set pairs of windows timezone and
    > Java time zone id.


    You web and app server are in different time zones ?

    I believe TimeZone.getTimeZone is rather flexible, so
    why not give it a try.

    If it does not, then either IIS will have to know Java
    format or Java will need to know IIS format.

    Arne
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 11, 2006
    #3
  4. Martin Gregorie wrote:
    > Do current versions of Windoze use timezones yet? It used to ignore the
    > whole thing by running the PC's hardware clock on local time.


    The windows installation program has asked about timezone
    since windows 95.

    Arne
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 11, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. axrock
    Replies:
    8
    Views:
    937
    Roedy Green
    Mar 25, 2009
  2. Ami
    Replies:
    5
    Views:
    264
  3. Justin Voelker
    Replies:
    2
    Views:
    252
    Dr J R Stockton
    Dec 2, 2008
  4. Roy Smith
    Replies:
    0
    Views:
    194
    Roy Smith
    Mar 31, 2013
  5. Stéphane Klein
    Replies:
    0
    Views:
    65
    Stéphane Klein
    Dec 2, 2013
Loading...

Share This Page