TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why MySQL’s DATETIME can and should be avoided

1 点作者 zeeone超过 13 年前

2 条评论

skurry超过 13 年前
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.
评论 #3219305 未加载
politician超过 13 年前
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.