php and mysql date time difference

前端 未结 4 724
轮回少年
轮回少年 2021-01-24 15:20

I did this in php to store the lastlogin in a mysql datetime column

date(\'Y-m-d h:i:s\') //which then gave > \'2014-01-04 08:00:56\'

and th

4条回答
  •  耶瑟儿~
    2021-01-24 15:45

    I solved the problem by deleting the date column and created it again. this now recorded the time in the correct format

    timestamp gave 2014-01-04 20:58:56, and NOW() gave 2014-01-04 20:58:56

    thanks for all who contributed, this wasn't a timezone issue as @AbdulJabbarWebBestow mentioned

    Thanks again

提交回复
热议问题