Topic
  • 4 replies
  • Latest Post - ‏2007-06-20T18:32:12Z by SystemAdmin
SystemAdmin
SystemAdmin
2340 Posts

Pinned topic Web Client - timezoneOffset

‏2007-06-12T16:57:16Z |

Does anyone know the usefulness of the timezoneOffset parameter passed to the web client servlet with a logon command?

Setting it does not appear to have any impact on the times returned by methods such as WorkItem.receivedTime().

Also, it appears to have no impact on the actual times stored on the database.

We are running version 3.5 in a 1 tier system on Solaris.

We are bringing up a web application for users in a different time zone and would like for the application to display the correct local time without having to modify the application to do it.

So far, the only way we have found to affect the times is to create a separate database instance for the configuration and start the instance with the appropriate timezone variable (TZ) set in Solaris. For maintenance reasons, it is not desirable to have an additional database instance.

Thanks.
Updated on 2007-06-20T18:32:12Z at 2007-06-20T18:32:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2340 Posts

    Re: Web Client - timezoneOffset

    ‏2007-06-14T08:36:44Z  
    Brian,

    I can explain the WebClient's timezone handling, however it is unclear to
    me,
    how exactly your business scenario looks like.

    When considering timezones, you have at least 3 tiers (even in a 1 tier
    MQWF setup :-)):

    On the MQWF server and on the database level all MQWF timestamps are
    stored in UTC
    time (timezone offset = 0).

    The AppServer that runs the web application (Web Client + API) runs in the
    timezone set
    on its hosting box (Solaris). The MQWF API always converts between UTC and
    local time
    when transferring date to/form the MQWF server.

    The MQWF Web Client converts timestamps between the timezone of the MQWF
    API
    (i.e. the AppServer's timezone) and the timezone of the browser, which
    could be a totally
    different timezone. The Web Client's timezone offset parameter is used for
    this purpose.
    It is sent automatically by the browser and evaluated by the Web Client.
    it is not intented to
    be set by the end user. You can change this offset when you change the
    timezone on the
    box where the browser runs.

    So far so good. Now to your scenario. If you have an application (process
    template?) that
    runs in a different timezone - what do you mean by this? Do you mean the
    MQWF server's
    timezone, the AppServer's timezone or the Browser's timezone?

    Hope this helps to give you a clue where to do more investigations.

    Volker Hoss
    IBM WebSphere Process Server Development
  • SystemAdmin
    SystemAdmin
    2340 Posts

    Re: Web Client - timezoneOffset

    ‏2007-06-14T19:55:41Z  
    Brian,

    I can explain the WebClient's timezone handling, however it is unclear to
    me,
    how exactly your business scenario looks like.

    When considering timezones, you have at least 3 tiers (even in a 1 tier
    MQWF setup :-)):

    On the MQWF server and on the database level all MQWF timestamps are
    stored in UTC
    time (timezone offset = 0).

    The AppServer that runs the web application (Web Client + API) runs in the
    timezone set
    on its hosting box (Solaris). The MQWF API always converts between UTC and
    local time
    when transferring date to/form the MQWF server.

    The MQWF Web Client converts timestamps between the timezone of the MQWF
    API
    (i.e. the AppServer's timezone) and the timezone of the browser, which
    could be a totally
    different timezone. The Web Client's timezone offset parameter is used for
    this purpose.
    It is sent automatically by the browser and evaluated by the Web Client.
    it is not intented to
    be set by the end user. You can change this offset when you change the
    timezone on the
    box where the browser runs.

    So far so good. Now to your scenario. If you have an application (process
    template?) that
    runs in a different timezone - what do you mean by this? Do you mean the
    MQWF server's
    timezone, the AppServer's timezone or the Browser's timezone?

    Hope this helps to give you a clue where to do more investigations.

    Volker Hoss
    IBM WebSphere Process Server Development
    Thank you Volker. I should have been more specific about the application.

    The mqwf server, database, and app server will run in one timezone and the browser will run in another timezone.

    The test I performed was to create a test logon jsp page that passed a hard-coded timezoneOffset value of 0 (zero) to the web client servlet via the logon command.

    What I expected was that subsequent jsp pages that use the api to display work items, etc. would display the times in UTC. However, there was no difference in times from when the automatic local timezone is passed.

    Is this because the jsp page is build on the back-end (app server)?

    > Brian,
    >
    > I can explain the WebClient's timezone handling,
    > however it is unclear to
    > me,
    > how exactly your business scenario looks like.
    >
    > When considering timezones, you have at least 3 tiers
    > (even in a 1 tier
    > MQWF setup :-)):
    >
    > On the MQWF server and on the database level all MQWF
    > timestamps are
    > stored in UTC
    > time (timezone offset = 0).
    >
    > The AppServer that runs the web application (Web
    > Client + API) runs in the
    > timezone set
    > on its hosting box (Solaris). The MQWF API always
    > converts between UTC and
    > local time
    > when transferring date to/form the MQWF server.
    >
    > The MQWF Web Client converts timestamps between the
    > timezone of the MQWF
    > API
    > (i.e. the AppServer's timezone) and the timezone of
    > the browser, which
    > could be a totally
    > different timezone. The Web Client's timezone offset
    > parameter is used for
    > this purpose.
    > It is sent automatically by the browser and evaluated
    > by the Web Client.
    > it is not intented to
    > be set by the end user. You can change this offset
    > when you change the
    > timezone on the
    > box where the browser runs.
    >
    > So far so good. Now to your scenario. If you have an
    > application (process
    > template?) that
    > runs in a different timezone - what do you mean by
    > this? Do you mean the
    > MQWF server's
    > timezone, the AppServer's timezone or the Browser's
    > timezone?
    >
    > Hope this helps to give you a clue where to do more
    > investigations.
    >
    > Volker Hoss
    > IBM WebSphere Process Server Development
  • SystemAdmin
    SystemAdmin
    2340 Posts

    Re: Web Client - timezoneOffset

    ‏2007-06-15T06:29:04Z  
    Thank you Volker. I should have been more specific about the application.

    The mqwf server, database, and app server will run in one timezone and the browser will run in another timezone.

    The test I performed was to create a test logon jsp page that passed a hard-coded timezoneOffset value of 0 (zero) to the web client servlet via the logon command.

    What I expected was that subsequent jsp pages that use the api to display work items, etc. would display the times in UTC. However, there was no difference in times from when the automatic local timezone is passed.

    Is this because the jsp page is build on the back-end (app server)?

    > Brian,
    >
    > I can explain the WebClient's timezone handling,
    > however it is unclear to
    > me,
    > how exactly your business scenario looks like.
    >
    > When considering timezones, you have at least 3 tiers
    > (even in a 1 tier
    > MQWF setup :-)):
    >
    > On the MQWF server and on the database level all MQWF
    > timestamps are
    > stored in UTC
    > time (timezone offset = 0).
    >
    > The AppServer that runs the web application (Web
    > Client + API) runs in the
    > timezone set
    > on its hosting box (Solaris). The MQWF API always
    > converts between UTC and
    > local time
    > when transferring date to/form the MQWF server.
    >
    > The MQWF Web Client converts timestamps between the
    > timezone of the MQWF
    > API
    > (i.e. the AppServer's timezone) and the timezone of
    > the browser, which
    > could be a totally
    > different timezone. The Web Client's timezone offset
    > parameter is used for
    > this purpose.
    > It is sent automatically by the browser and evaluated
    > by the Web Client.
    > it is not intented to
    > be set by the end user. You can change this offset
    > when you change the
    > timezone on the
    > box where the browser runs.
    >
    > So far so good. Now to your scenario. If you have an
    > application (process
    > template?) that
    > runs in a different timezone - what do you mean by
    > this? Do you mean the
    > MQWF server's
    > timezone, the AppServer's timezone or the Browser's
    > timezone?
    >
    > Hope this helps to give you a clue where to do more
    > investigations.
    >
    > Volker Hoss
    > IBM WebSphere Process Server Development
    Brian,

    now I got your point. Specifying a timezone offset 0 on the logon page is
    equivalent
    with setting the timezone to GMT on the box where your browser is running
    • except
    that you do not have DST support.

    The reason why this is not working is because you do not use the Web
    Client's conversion logic.
    Your JSPs obtain the time values directly from the API objects, which is
    the AppServer's
    timezone. The Web Client's List implementation for example uses
    RequestContext(toString(cal))
    to convert from local API time to local browser time. Have a look at e.g.
    WorkitemList.jsp.

    Volker Hoss
    IBM WebSphere Process Server Development
  • SystemAdmin
    SystemAdmin
    2340 Posts

    Re: Web Client - timezoneOffset

    ‏2007-06-20T18:32:12Z  
    Brian,

    now I got your point. Specifying a timezone offset 0 on the logon page is
    equivalent
    with setting the timezone to GMT on the box where your browser is running
    • except
    that you do not have DST support.

    The reason why this is not working is because you do not use the Web
    Client's conversion logic.
    Your JSPs obtain the time values directly from the API objects, which is
    the AppServer's
    timezone. The Web Client's List implementation for example uses
    RequestContext(toString(cal))
    to convert from local API time to local browser time. Have a look at e.g.
    WorkitemList.jsp.

    Volker Hoss
    IBM WebSphere Process Server Development
    Volker, I got this working, thanks to your help.

    I ended up using context.getTimezoneOffset in my jsp in order to adjust the date and format it differently than context.toString()

    Thanks again,

    Brian