Joda time DateTime incorrectly stores in database

前端 未结 7 1881
青春惊慌失措
青春惊慌失措 2020-12-30 08:18

I\'m storing JodaTime DateTime field to timestamptz column by using org.jadira.usertype:usertype.jodatime:1.9. App server has +4 time

7条回答
  •  太阳男子
    2020-12-30 08:55

    Try starting JVM with -Duser.timezone=UTC to JAVA_OPTS that way the time is in one zone and you can then do your operations on that to convert it to where ever you are.

提交回复
热议问题