Local time zone offset in PostgreSQL

前端 未结 2 913
礼貌的吻别
礼貌的吻别 2020-12-30 19:44

My web app stores all timestamps in UTC without time zones. I have a shell/psql script that returns a list of recent logins, and I want that script to display login times in

2条回答
  •  情歌与酒
    2020-12-30 20:43

    To get # of seconds difference as an integer, I have used simply:

    select extract( timezone from now() );
    

提交回复
热议问题