Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Timestamp in Hive without Timezone


Is it possible to store the timestamp value in a column in Hive without the timezone part?

For e.g. Oracle supports the timestamp value without a timezone attached to it -

The requirement simply is that store whatever value of the timestamp is given in a column. Currently, Hive automatically applies Day Light Savings adjustment based on the timezone value.

Any inputs are appreciated. Thanks


Expert Contributor

Hive always takes timezone into consideration. May be what you want to try is to set that field as String which will retain the same value.

Master Guru

Hi @bsaini, you can keep it as an int or float representing Unix timestamp in seconds (float if you want to use sub-second units up to nanosec), or a string. From what I see here: Timestamps are interpreted to be timezoneless and stored as an offset from the UNIX epoch. Convenience UDFs for conversion to and from timezones are provided (to_utc_timestamp, from_utc_timestamp).