Announcement

Collapse
No announcement yet.

Timezone for server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Timezone for server

    Hi,

    I think this could be a stupid question, but does the OX server have to run under a JVM configured to run in the GMT/UTC timezone (-Duser.timezone=GMT+0)? I think all time values passed around from GUI to server are UTC standard, and I think that means the OX server must run under GMT/UTC to make the dates all work out.

    I might be confused re: how timezones and offsets are handled in Java and OX server, but when I run my JVM outside GMT/UTC and store dates generated by the date picker in the GUI (UTC based) (e.g. task->start_date) my dates in MySQL/MS-SQL look off by the offset between GMT/UTC and my default JVM timezone (America/Los_Angeles).

    That led me to deduce that I might have to run the JVM using timezone GMT/UTC rather than America/Los_Angeles.

    Any insight is appreciated.

  • #2
    Hi,

    the timezone of the physical server does not matter, nor does the timezone of the JVM. Every user has a configurable timezone attribute which is "wrapped" around the UTC dates which are stored to the database. So if a user with UTC+1 saves a appointment at 10:00 it's shown as 09:00 at the database as "time zone corrected". This is mandatory for multi-user calendars with different timezones per user. For example with one user in New York, one in Berlin and one in Tokyo, they all see the same appointment on different times because their personal timezone offset is calculated based on the appointment which is stored in UTC. Additionally, daylight saving times are calculated based on the date at the database.

    This is a appointment which starts at 13:00 and ends 14:00 in timezone Europe/Berlin. We currently have summer, so DST+1 (daylight saving) and UTC+1 (timezone). So any user in Berlin will see 13:00 as a "user time" but the database stores UTC based on the configuration of the jdbc driver (which is UTC by default).

    timestampfield01: 2008-05-30 11:00:00
    timestampfield02: 2008-05-30 12:00:00
    timezone: Europe/Berlin

    Hope that helps

    Comment

    Working...
    X