MySQL now() change timezone

后端 未结 4 1145
庸人自扰
庸人自扰 2020-12-20 13:51

I\'m using the following INSERT statement:

INSERT INTO messages SET `to` = \'\".$to.\"\', `from` = \'\".$this->userid.\"\', `title` = \'\".$title.\"\', `m         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-20 14:23

    You would want to go ahead and use the CONVERT_TZ() function in MySQL. It's based off the Olson database which your operating system uses.

    Here is the documentation.

提交回复
热议问题