Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select current time "now ()" and convert it to GMT 0

Tags:

mysql

I need to convert now() to GMT0.

SELECT now();

should output current time in GMT0. Is it possible without changing time zone? And using only one select statement?

Thanks in advance for you help.

like image 980
Panos Kal. Avatar asked Mar 28 '12 13:03

Panos Kal.


1 Answers

The function utc_timestamp should do what you want.

SELECT utc_timestamp();
like image 166
Henrik Ripa Avatar answered Nov 07 '22 03:11

Henrik Ripa