Mysql default timezone

旧巷老猫 提交于 2019-12-11 03:59:26

问题


My server is in US, and I'm in istanbul. Problem is I want to ask mysql about current time. Is there a function to adjust it's time accourding to mine?

select * from xyz where dateTimeField<now();

dateTimeField will available after 10 hours that it shoud be!


回答1:


Use command

SET time_zone = timezone;

That sets it to your time zone. Refer to the details.



来源:https://stackoverflow.com/questions/4019102/mysql-default-timezone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!