Maia Mailguard

A Spam and Virus Management System

Version 1.0.2a


Thank you ReachOne Internet for hosting our website!

Ticket #489 (closed enhancement: fixed)

Opened 6 months ago

Last modified 2 months ago

Adjust time display based on timezone

Reported by: dmorton Assigned to: rjl
Priority: normal Milestone: 1.0.3
Component: General Version: 1.0.2
Severity: normal Keywords:
Cc:

Description

Chris Paul write:

It makes a lot of sense I think to have a time zone configuration setting
under Settings. This would specify an offset from the mail servers timezone which 
users could set to have their quarantine display mail items with the local time. It 
could be per-domain and inherited down to the user. It would probably also be a good 
idea to recommend that Maia servers (mail servers, web servers, etc) be set to UTC, 
since the standard and most logical way to offset local time is from UTC.

As noted in email,

The real question I have is one of performance: when do we make the adjustment? If we make it before being stored in the database, it might have ramifications for other processes. If we make the adjustment on every view, it could slow down the view. OTOH, it is stored in a datetime in sql, so it should be a very simple sql adjustment.

It looks like mysql has support:

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_convert-tz

And it appears, postgresql:

http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT

This would require a user setting for their own timezone, so it is slated for maia 1.1 at the earliest.

Change History

01/11/08 03:38:13 changed by dmorton

  • type changed from defect to enhancement.

05/15/08 13:39:27 changed by rjl

  • status changed from new to closed.
  • resolution set to fixed.

Ultimately I chose a much simpler implementation for [1231]. Rather than figuring out time zones and daylight savings time details, we just compare the system clocks on the server and the client to determine the offset (in seconds) between them, and then add that offset to the received_date timestamp in the SELECT statement used to produce the cache lists. No user settings are required--it's completely transparent. The offset is determined automatically during the login process and stored as a session variable.

05/18/08 06:59:40 changed by dmorton

  • milestone changed from 1.1.0 to 1.0.3.

retargetting for 1.0.3