from Hacker News

Why MySQL’s DATETIME can and should be avoided

by zeeone on 11/10/11, 5:20 AM with 3 comments

  • by skurry on 11/10/11, 5:39 AM

    Right, stop using those "complicated" built-in date processing functions and instead roll your own. What could possibly go wrong? Storing a number that's only meaningful when defining it somewhere outside of the database is much more fun! Finally you get to meet all your co-workers in person, at least all the junior developers who will stop by your desk to ask why there are these weird numbers in the date columns.
  • by politician on 11/10/11, 5:50 AM

    tldr: In this article from 2009, consider storing UTC plus the local timezone instead of the local server time when building applications that have users in multiple timezones. Use a time or a time offset as appropriate to capture a point in time (e.g. a birthday) or a timespan (e.g. the number of seconds this thing ran), resp.