[Rt-devel] Store dates in DB not in UTC?

Peter C. Lai peter at simons-rock.edu
Thu Jan 28 15:42:28 EST 2010


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: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


-- 
===========================================================
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
===========================================================



More information about the Rt-devel mailing list