You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashish Sharma (Jira)" <ji...@apache.org> on 2021/05/05 07:13:00 UTC

[jira] [Updated] (HIVE-25093) date_format() UDF is returning values in UTC time zone only

     [ https://issues.apache.org/jira/browse/HIVE-25093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Sharma updated HIVE-25093:
---------------------------------
    Description: 
Query - select date_format(current_timestamp,"yyyy-MM-dd HH:mm:ss.SSS z")

Result - 2021-05-04 13:00:33.358 UTC

As part of HIVE-12192 it was decided to have a common time zone for all computation i.e. "UTC". Due to which data_format() function was hard coded to "UTC".

But later in HIVE-21039 it was decided that user session time zone value should be the default not UTC. 

date_format() was not fixed as part of HIVE-21039.

Dropping this mail to understand what should be the ideal time zone value of date_format().

  was:
Query - select date_format(current_timestamp,"yyyy-MM-dd HH:mm:ss.SSS z")

Result - 2021-05-04 13:00:33.358 UTC

https://issues.apache.org/jira/browse/HIVE-12192 
As part of above jira it was decided to have a common time zone for all computation i.e. "UTC". Due to which data_format() function was hard coded to "UTC".

https://issues.apache.org/jira/browse/HIVE-21039
But later it was decided that user session time zone value should be the default not UTC. 

date_format() was not fixed as part of HIVE-21039.

Dropping this mail to understand what should be the ideal time zone value of date_format().


> date_format() UDF is returning values in UTC time zone only 
> ------------------------------------------------------------
>
>                 Key: HIVE-25093
>                 URL: https://issues.apache.org/jira/browse/HIVE-25093
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 3.1.2
>            Reporter: Ashish Sharma
>            Assignee: Ashish Sharma
>            Priority: Trivial
>
> Query - select date_format(current_timestamp,"yyyy-MM-dd HH:mm:ss.SSS z")
> Result - 2021-05-04 13:00:33.358 UTC
> As part of HIVE-12192 it was decided to have a common time zone for all computation i.e. "UTC". Due to which data_format() function was hard coded to "UTC".
> But later in HIVE-21039 it was decided that user session time zone value should be the default not UTC. 
> date_format() was not fixed as part of HIVE-21039.
> Dropping this mail to understand what should be the ideal time zone value of date_format().



--
This message was sent by Atlassian Jira
(v8.3.4#803005)