Database Date Format and Timezones
Dates in the database should be stored in a date/time field, and not in String format. This includes dates that are log entries as this makes it easier to print selective dates.
The dates in the database are in the timezone of the server. We had hoped to store the dates in the database in UTC (GMT) but it appeared to be complex to keep converting the dates and we had trouble with some of the Java conversion methods so we have gone with the server timezone for 2.0.
Full date/time formats should be used when displaying dates, rather than just dates, if at all possible. Dates need to displayed with a timezone. Users will see the dates in the servers timezone, so it is important they have an indication of the timezone (in case the user is in a different timezone). For example, if the server is in the Sydney timezone, the screen should indicate that it is the Sydney timezone, so that people using the system in Brisbane will know that they need to convert the time during summer (when the two cities are in different timezones).
It is not necessary to convert the date to a user's local time, as working out a user's timezone is not simple and using Javascript calls may not be reliable during daylight saving. In the future, we may add a user's timezone field to the user details. If this occurs, then it will be possible to reliably convert to a user's timezone and we may revise how we display date/times to users.
For JSP pages, use the <lams:Date> tag as this will give us consistency of dates across the system.