简体   繁体   English

MySQL默认时区

[英]Mysql default timezone

My server is in US, and I'm in istanbul. 我的服务器在美国,我在伊斯坦布尔。 Problem is I want to ask mysql about current time. 问题是我想询问mysql当前时间。 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! dateTimeField应该在10个小时后可用!

Use command 使用命令

SET time_zone = timezone;

That sets it to your time zone. 这将其设置为您的时区。 Refer to the details . 请参阅详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM