LZ说的"用户的注册时间字段为INT,我看了下代码,用的是TIMENOW值"有问题
应该是字段属性int,字段名为TIMENOW一般数据库里存的是UNIX时间戳时间戳转换可以用date()如下例在php中转换可以用:date("Y-m-d H:i:s",$time); //$time 为 unix 时间戳
应该是字段属性int,字段名为TIMENOW一般数据库里存的是UNIX时间戳时间戳转换可以用date()如下例在php中转换可以用:date("Y-m-d H:i:s",$time); //$time 为 unix 时间戳
这是赋值的代码,用的就是TIMENOW,数据库字段为INT(10)
转换为具体时间
datetime('Y-m-d h:i:s',时间戳);
date -- 格式化一个本地时间/日期
getdate -- 取得日期/时间信息
gettimeofday -- 取得当前时间
gmdate -- 格式化一个 GMT/UTC 日期/时间
gmmktime -- 取得 GMT 日期的 UNIX 时间戳
gmstrftime -- 根据区域设置格式化 GMT/UTC 时间/日期
idate -- Format a local time/date as integer
localtime -- 取得本地时间
microtime -- 返回当前 UNIX 时间戳和微秒数
mktime -- 取得一个日期的 UNIX 时间戳
strftime -- 根据区域设置格式化本地时间/日期
strtotime -- 将任何英文文本的日期时间描述解析为 UNIX 时间戳
time -- 返回当前的 UNIX 时间戳
说明
int time ( void )
返回自从 Unix 新纪元(格林威治时间 1970 年 1 月 1 日 00:00:00)到当前时间的秒数。 参见 date()。