[
https://issues.apache.org/jira/browse/HIVE-3910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13692196#comment-13692196
]
Jason Dere commented on HIVE-3910:
----------------------------------
When converting from a Date (millis since epoch) to DateWritable (days since
epoch), I was trying to do the following:
Determine the year/month/day of the Date, in the local time zone.
Based on the year/month/day, calculate the days since epoch.
As well as to do the opposite when generating a Date value based on the days
since epoch value. Ideally you would want to be able to generate a Date value
in one place, and to be able to have the DateWritable still show the same
year/month/day even if it is later processed in a different time zone.
I was actually having trouble doing this using the standard Java date
libraries, there seemed to be some issues related to daylight savings which was
messing up the conversions I was doing. Joda actually seemed to be the only way
to get it to work correctly. I can another look at trying it using the
standard date lib - if I can get it working then I'll remove the joda
dependency.
> Create a new DATE datatype
> --------------------------
>
> Key: HIVE-3910
> URL: https://issues.apache.org/jira/browse/HIVE-3910
> Project: Hive
> Issue Type: Task
> Reporter: Namit Jain
> Attachments: HIVE-3910.1.patch
>
>
> It might be useful to have a DATE datatype along with timestamp.
> This can only store the day (possibly number of days from 1970-01-01,
> and would thus give space savings in binary format).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira