hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (HIVE-25403) from_unixtime() does not consider leap seconds
Date Fri, 30 Jul 2021 05:27:00 GMT


ASF GitHub Bot logged work on HIVE-25403:

                Author: ASF GitHub Bot
            Created on: 30/Jul/21 05:26
            Start Date: 30/Jul/21 05:26
    Worklog Time Spent: 10m 
      Work Description: warriersruthi opened a new pull request #2550:

   The query 
   SELECT from_unixtime(unix_timestamp(cast('1400-01-01' as date)));
   was giving wrong results, because the from_unixtime() function was not considering leap
seconds while representing Timestamp (it was using java.utils.Date). 
   The Unix_timestamp() already considered this, so in order to get the correct results for
the above query, it was required to change the epoch time in the from_unixtime() to ZonedDateTime.
The required conversion was done with the help of the Instant class, which represents a moment
given the epoch time. 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail:

For queries about this service, please contact Infrastructure at:

Issue Time Tracking

            Worklog Id:     (was: 631462)
    Remaining Estimate: 0h
            Time Spent: 10m

>  from_unixtime() does not consider leap seconds
> -----------------------------------------------
>                 Key: HIVE-25403
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Sruthi Mooriyathvariam
>            Assignee: Sruthi Mooriyathvariam
>            Priority: Major
>             Fix For: 3.1.2
>         Attachments: image-2021-07-29-14-42-49-806.png
>          Time Spent: 10m
>  Remaining Estimate: 0h
> The Unix_timestamp() considers "leap second" while the from_unixtime is not; which results
in to wrong result as below:
> !image-2021-07-29-14-42-49-806.png!

This message was sent by Atlassian Jira

View raw message