[ 
https://issues.apache.org/jira/browse/HIVE-25093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17339554#comment-17339554
 ] 

Stamatis Zampetakis commented on HIVE-25093:
--------------------------------------------

Hey [~ashish-kumar-sharma], I am a bit confused with your example. The result 
that you get for the query seems to be the correct one; can you explain what is 
wrong?

The formatting string that you specified asks explicitly (the 'z' in the end 
means zero-offset or equivalently UTC) to format the timestamp in UTC timezone. 
If UTC is not what you want the I guess you should specify another timezone.

> 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.
> what should be the ideal time zone value of date_format().



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

Reply via email to