Dealing with PHP server and MySQL server in different time zones

后端 未结 5 569
眼角桃花
眼角桃花 2020-12-13 11:30

For those of us who use standard shared hosting packages, such as GoDaddy or Network Solutions, how do you handle datetime conversions when your hosting server (PHP) and MyS

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 11:57

    Store everything as UTC. You can do conversions at the client level, or on the server side using client settings.

    php - date

    mysql - utc-timestamp

提交回复
热议问题