Timezone conversion in queries

11 views
Skip to first unread message

Midhun Nair

unread,
Jun 22, 2020, 5:47:43 PM6/22/20
to mybatis-user
I have a Mapper "MessageResulMapper.xml" which actually fetches some rows from the Oracle DB.

The columns also include some of the Timestamp fields. In the database the value of this Dthis field is stored in EST, is there a way I can do a conversion from EST to say Asia timezone while fetching the results in mybatis side rather than wrapping the resultSet and then passing it to a service which converts these DateTime field to desired timezone.

Thanks in advance.

Guy Rouillier

unread,
Jun 22, 2020, 7:39:04 PM6/22/20
to mybati...@googlegroups.com
Oracle has the ability to do that; I found some examples here:


If you'd prefer to do it in Java code, then add the appropriate logic to the getter method for that property.
-- 
--
Guy Rouillier
Reply all
Reply to author
Forward
0 new messages