can hibernate convert date field into given timezone at transaction or session level?

瘦欲@ 提交于 2019-12-12 22:50:15

问题


We are working on a feature to store 'date' in a given timezone, irrespective of the current JVM timezone.

It is important for me to store it in a given timezone, because lot of other existing systems needs it that way.

I know we can set the current timezone of the JVM and everything will work. But we have requests coming from different timezones concurrently, which will break with above approach.

Can we do something similar to the timezone setting of JVM @ transaction or session level in Hibernate to handle this situation?

After googling for a while, I could not see related problem. Need some help! direction or work around?

来源:https://stackoverflow.com/questions/46493135/can-hibernate-convert-date-field-into-given-timezone-at-transaction-or-session-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!