1
sun019 2011 年 11 月 24 日
int
|
2
Ricepig 2011 年 11 月 24 日
如果语言支持不好,宁愿用int
|
3
ywjno 2011 年 11 月 24 日
只是要日期不要时分秒毫秒的话直接char(8)
|
4
sarices 2011 年 11 月 25 日
直接用int,方便点
|
5
Livid MOD PRO 并且,记得要存的是 UTC 时区的 timestamp。
这样的话,如果有一天你的服务器的时区(比如服务器从美国挪到中国)变了,你存的时间戳不会出问题。 |
6
Emory_M OP @Livid 查了下 无论是unix timestamp还是mysql的timestamp类型默认都是UTC,在取值时候进行转换
所以不用担心,设定正确timezone就可以了 谢谢大家回复,安心用int好了 |
8
lizuoqiang 2020 年 9 月 3 日
@ywjno 胎神哦,那还不如用 int
|