Mysql 默认时区 [英] Mysql default timezone

查看:56
本文介绍了Mysql 默认时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器在美国,而我在伊斯坦布尔.问题是我想向 mysql 询问当前时间.有没有根据我的时间调整时间的功能?

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 将在 10 小时后可用!

dateTimeField will available after 10 hours that it shoud be!

推荐答案

使用命令

SET time_zone = timezone;

将其设置为您的时区.请参阅详细信息.

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

这篇关于Mysql 默认时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆