# How to map the Oracle TIMESTAMP WITH TIME ZONE with JPA

DevFeed: [How to map the Oracle TIMESTAMP WITH TIME ZONE with JPA](<https://devfeed.tech/articles/how-to-map-the-oracle-timestamp-with-time-zone-with-jpa-21987.md>)

Original publisher: [Read original article](<https://vladmihalcea.com/oracle-timestamp-with-time-zone-jpa/>)

Author: vladmihalcea

Published: 2025-03-18T16:21:37Z

Content type: tutorial

Language: en

Sources: [Vlad Mihalcea](<https://devfeed.tech/sources/vlad-mihalcea.md>)

Topics: [jpa](<https://devfeed.tech/topics/jpa.md>), [Oracle Database](<https://devfeed.tech/topics/oracle-database.md>), [OffsetDateTime](<https://devfeed.tech/topics/offsetdatetime.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [allows](<https://devfeed.tech/tags/allows.md>), [article](<https://devfeed.tech/tags/article.md>), [column](<https://devfeed.tech/tags/column.md>), [explain](<https://devfeed.tech/tags/explain.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [i](<https://devfeed.tech/tags/i.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [map](<https://devfeed.tech/tags/map.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [offsetdatetime](<https://devfeed.tech/tags/offsetdatetime.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [store](<https://devfeed.tech/tags/store.md>), [this](<https://devfeed.tech/tags/this.md>), [time](<https://devfeed.tech/tags/time.md>), [timezone](<https://devfeed.tech/tags/timezone.md>), [type](<https://devfeed.tech/tags/type.md>), [types](<https://devfeed.tech/tags/types.md>), [values](<https://devfeed.tech/tags/values.md>), [with](<https://devfeed.tech/tags/with.md>), [zoneddatetime](<https://devfeed.tech/tags/zoneddatetime.md>)

## AI overview

Oracle TIMESTAMP WITH TIME ZONE stores fractional seconds plus time zone region or offset, unlike Oracle DATE and TIMESTAMP, which do not store time zone information. The article says it can map to Java ZonedDateTime or OffsetDateTime. For a column storing a region, the excerpt shows a ZonedDateTime mapping and explains that Hibernate's default handling reads the value as an OffsetDateTime; explicitly selecting the appropriate Hibernate type is needed to retain the region when fetching. The excerpt ends during the fetch example and does not provide the complete mapping code or OffsetDateTime details.

## Source excerpt

Introduction In this article, I'm going to explain how to map the Oracle TIMESTAMP WITH TIME ZONE with JPA and Hibernate. While the DATE and TIMESTAMP column types are suitable for mapping the LocalDateTime, the TIMESTAMP WITH TIME ZONE column type allows us to map both the ZonedDateTime and OffsetDateTime. Oracle TIMESTAMP WITH TIME ZONE Traditionally, Oracle provided the DATE and TIMESTAMP column types to store timestamp values. The difference between the DATE and TIMESTAMP types is that the TIMESTAMP column type allows us to store fractional seconds while the DATE type... Read More The post How to map the Oracle TIMESTAMP WITH TIME ZONE with JPA appeared first on Vlad Mihalcea.