Fastest postgreSQL equivalent to MySQL UTC_DATE() (getting UTC date)?

前端 未结 1 1110
旧巷少年郎
旧巷少年郎 2021-01-17 17:45

I am new to postgreSQL and to my surprise there appears to be no single function equivalent to UTC_DATE() from MySQL.

I was able to get desired result u

相关标签:
1条回答
  • 2021-01-17 18:47

    Use the time zone capability of PostgreSQL:

    SELECT 
        CAST(NOW() at time zone 'utc' AS date); 
    
    0 讨论(0)
提交回复
热议问题