mysql datetime vs timestamp
来源:互联网 发布:知乎年度300问 编辑:程序博客网 时间:2024/05/21 15:01
点击打开链接http://stackoverflow.com/questions/409286/should-i-use-field-datetime-or-timestamp#
In MySQL 5 and above, TIMESTAMP values are converted from the current time zone to UTC for storage, and converted back from UTC to the current time zone for retrieval. (This occurs only for the TIMESTAMP data type, and not for other types such as DATETIME.)
By default, the current time zone for each connection is the server's time. The time zone can be set on a per-connection basis, as described in MySQL Server Time Zone Support.
An important difference is that DATETIME
represents a date (as found in a calendar) and a time (as can be observed on a wall clock), while TIMESTAMP
represents a well defined point in time. This could be very important if your application handles time zones. How long ago was '2010-09-01 16:31:00'? It depends on what timezone you're in. For me it was just a few seconds ago, for you it may represent a time in the future. If I say 1283351460 seconds since '1970-01-01 00:00:00 UTC', you know exactly what point in time I talk about
- mysql datetime vs timestamp
- mysql datetime timestamp比较
- mysql datetime timestamp
- mysql datetime,timestamp,date
- mysql Date DateTime TimeStamp
- mysql timestamp datetime区别
- mysql datetime timestamp范围
- mysql datetime与timestamp区别
- Mysql------date、datetime、timestamp区别
- mysql中TIMESTAMP和DATETIME
- TIMESTAMP vs. DATETIME, 该用哪一个?
- DATETIME、DATE和TIMESTAMP类型--MySql数据库
- mysql 中的datetime和timestamp的比较
- mysql 中的datetime和timestamp的比较
- MySQL中的datetime与timestamp比较
- 【转】MySQL中的datetime与timestamp比较
- mysql——timestamp和datetime格式
- mysql中 datetime 和timestamp的区别
- POJ 3274 - 数组 + 哈希
- Solr5创建Collection的多core。
- 数字签名与数字证书
- SetWindowPos讲解
- Java之IO概述
- mysql datetime vs timestamp
- Struts的优点/缺点
- 十年·杭研大咖说 | 邱似峰:从应届生到网易视频云CTO的蜕变
- 第11章 结构化数据
- 【数学】奇异值分解(SVD)原理详解及推导
- 母函数与指数型母函数模板
- MySQL存储引擎与数据类型
- 2016 macbook pro 开关机
- 深度学习在图像取证中的进展与趋势