MySQL query for current GMT time

后端 未结 9 1280
你的背包
你的背包 2020-12-24 07:39

This sounds simple enough but I haven\'t been able to figure out how to use a simple SELECT statement to return the current time in GMT.

I have been trying to use CO

9条回答
  •  我在风中等你
    2020-12-24 08:18

    I was searching for my time zone which is GMT+6 (Asia/Dhaka TimeZone)

    MySQL server is in US. The below worked for me.

    SELECT CONVERT_TZ( UTC_TIMESTAMP( ) , '+06:00', '+00:00' )

提交回复
热议问题