> I look forward to any thoughts about data types. Personally, the very
> first reaction this trigger is: the backend of the accounting system
> should be set to a timezone that does not change during the year and,
> even more ideally, to UTC. UTC is ideal because it helps when stuff is
> spanning across timezones. Then, if data is consumed internally, say,
> by scripts this may even be enough; if data is presented externally
> instead, any timestamp manipulation should be done in the frontend.

+1 to storing your application data in UTC.

I’d also avoid usage of TIMESTAMP as it can lead to confusion.
Instead, you can use the following DDL when creating tables for the same 
functionality:

column_name DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Cheers :)


Will Dowling


_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to