<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Can we change default hive/hbase timestamp from UTC to other timezone ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/337941#M232708</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95785"&gt;@nikrahu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We believe the Post by&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;answer your Queries. As such, We shall mark the Post as Resolved. If you have any concerns, Feel free to engage Cloudera Community via a Post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;for the detailed Examples !!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 09:34:34 GMT</pubDate>
    <dc:creator>smdas</dc:creator>
    <dc:date>2022-03-08T09:34:34Z</dc:date>
    <item>
      <title>Can we change default hive/hbase timestamp from UTC to other timezone ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/336202#M232189</link>
      <description>&lt;P&gt;Hadoop components are using default timestamp as UTC. Is there any way to change the default time zone from UTC.&lt;BR /&gt;Now only seeing option to do the shifting using&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 09:02:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/336202#M232189</guid>
      <dc:creator>nikrahu</dc:creator>
      <dc:date>2022-02-14T09:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can we change default hive/hbase timestamp from UTC to other timezone ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/336283#M232221</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hiveserver2 runs as a java process, When running timestamp-related UDF functions in Hive, the default behavior is to use the system's timezone information to convert timestamp values. PFB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;INFO  : Executing command(queryId=hive_20220215131716_33c6c90b-207a-43fe-9bcf-4a52cd04de3e): SELECT current_timestamp()
INFO  : Completed executing command(queryId=hive_20220215131716_33c6c90b-207a-43fe-9bcf-4a52cd04de3e); Time taken: 0.092 seconds
INFO  : OK
+--------------------------+
|           _c0            |
+--------------------------+
| 2022-02-15 13:17:16.204  |
+--------------------------+
1 row selected (2.413 seconds)


[hive@c2757-node3 ~]$ date
Tue Feb 15 13:17:26 IST 2022
[hive@c2757-node3 ~]$ timedatectl | grep "Time zone"
       Time zone: Asia/Kolkata (IST, +0530)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make Hive return a specific timezone with the timestamp function. please follow the steps below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;1. Go to the Cloudera Manager home page &amp;gt; Hive &amp;gt; Configuration&lt;BR /&gt;Under "Client Java Configuration Options", append " -Duser.timezone=UTC" in the text string (be mindful of the leading space in front, if you append to the end of existing options).&lt;BR /&gt;2 . Under "Java Configuration Options for HiveServer2", append the same thing to the end of the text string " -Duser.timezone=UTC".&lt;BR /&gt;3 . Save the configuration, then restart any HiveServer2 instances, and select Actions -&amp;gt; "Deploy Client Configuration" through Cloudera Manager.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To confirm the new configuration is working, see below test outputs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Before the change (system's default timezone is IST):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;INFO  : Executing command(queryId=hive_20220215131716_33c6c90b-207a-43fe-9bcf-4a52cd04de3e): SELECT current_timestamp()
INFO  : Completed executing command(queryId=hive_20220215131716_33c6c90b-207a-43fe-9bcf-4a52cd04de3e); Time taken: 0.092 seconds
INFO  : OK
+--------------------------+
|           _c0            |
+--------------------------+
| 2022-02-15 13:17:16.204  |
+--------------------------+
1 row selected (2.413 seconds)


[hive@c2757-node3 ~]$ date
Tue Feb 15 13:17:26 IST 2022
[hive@c2757-node3 ~]$ timedatectl | grep "Time zone"
       Time zone: Asia/Kolkata (IST, +0530)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;After the change to UTC,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[hive@c2757-node3 ~]$ timedatectl | grep "Time zone"
       Time zone: Asia/Kolkata (IST, +0530)
[hive@c2757-node3 ~]$ date
Tue Feb 15 13:28:05 IST 2022

INFO  : Executing command(queryId=hive_20220215075824_6a58bdcb-b1b6-470d-9202-26ccfc60f521): SELECT current_timestamp()
INFO  : Completed executing command(queryId=hive_20220215075824_6a58bdcb-b1b6-470d-9202-26ccfc60f521); Time taken: 0.079 seconds
INFO  : OK
+--------------------------+
|           _c0            |
+--------------------------+
| 2022-02-15 07:58:24.785  |
+--------------------------+
1 row selected (2.24 seconds)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Like this, you can mention hive to use other timezones.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 08:04:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/336283#M232221</guid>
      <dc:creator>ggangadharan</dc:creator>
      <dc:date>2022-02-15T08:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can we change default hive/hbase timestamp from UTC to other timezone ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/337941#M232708</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95785"&gt;@nikrahu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We believe the Post by&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;answer your Queries. As such, We shall mark the Post as Resolved. If you have any concerns, Feel free to engage Cloudera Community via a Post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92016"&gt;@ggangadharan&lt;/a&gt;&amp;nbsp;for the detailed Examples !!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 09:34:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-we-change-default-hive-hbase-timestamp-from-UTC-to-other/m-p/337941#M232708</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-03-08T09:34:34Z</dc:date>
    </item>
  </channel>
</rss>

