简体   繁体   中英

PostgreSQL - how to convert timestamp with timezone to timestamp without timezone

In my PostgreSQL database, the datetime stored as 2022-05-10 10:44:19+08 and when I get the datetime by using the sequelize, it will give in format:: 2022-05-10T02:44:19.000Z .

So, my question is how to convert to 2022-05-10 10:44:19 ?

Thanks in advance.

There is a direct dependence on the time of your server. Therefore, depending on what you want to get, you can use different options. Here is a dbfiddle with examples

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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