Store dates in DB not in UTC?

Hi all.

rt 3.8.5

Is it possible to modify subroutines that control dates to store dates
in DB not in UTC but in local server’s timezone?

It seems that too many things depend on UTC in DB. Am I right?

Agnislav Onufrijchuk
PortaOne, Inc., RT Developer
Tel: +1-866-SIP VOIP (+1 866 747 8647) ext. 7670

 Meet us at Cairo ICT 2010
 Cairo International Conference Center
 Feb 7-10, Hall 3, Booth 3A1

Hi all.

rt 3.8.5

Is it possible to modify subroutines that control dates to store dates
in DB not in UTC but in local server’s timezone?

I would expect that this would be a fair amount of work. And it would
mean that your database can no longer be easily moved to another
timezone. Additionally, it means that you start to have to think about
daylight savings time for tickets in your database.

It seems that too many things depend on UTC in DB. Am I right?

You are correct.

signature.asc (197 Bytes)

Every developer worth their consulting fee will tell you to always store
dates in POSIX or ISO-8601 UTC format and use timezone offsets to calculate
“local time” from these dates for user display. TZ conversion code is
boilerplate, there’s probably a cpan module that does it for you
automagically if you really need the help…On 2010-01-28 12:25:12PM -0800, Jesse Vincent wrote:

On Wed 27.Jan’10 at 17:30:15 +0200, Agnislav Onufrijchuk wrote:

Hi all.

rt 3.8.5

Is it possible to modify subroutines that control dates to store dates
in DB not in UTC but in local server’s timezone?

I would expect that this would be a fair amount of work. And it would
mean that your database can no longer be easily moved to another
timezone. Additionally, it means that you start to have to think about
daylight savings time for tickets in your database.

It seems that too many things depend on UTC in DB. Am I right?

You are correct.


List info: The rt-devel Archives

Peter C. Lai | Bard College at Simon’s Rock
Systems Administrator | 84 Alford Rd.
Information Technology Svcs. | Gt. Barrington, MA 01230 USA
peter AT simons-rock.edu | (413) 528-7428

Every developer worth their consulting fee will tell you to always store
dates in POSIX or ISO-8601 UTC format and use timezone offsets to calculate
“local time” from these dates for user display. TZ conversion code is

Or, use a database that knows how to do this for you. TIMESTAMP WITH
TIMEZONE is the only usable way to store timestamps and have them mean
anything… but RT is DB agnostic, so cannot take advantage of this I
suspect.