<?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>topic Re: How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8953#M4470</link>
    <description>&lt;P&gt;The question is not resolved and my most recent reply shows exactly what I want the output to be for a set of inputs. I don't know what else I can do to make it clearer. &lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 19:54:00 GMT</pubDate>
    <dc:creator>jonathan-dufaul</dc:creator>
    <dc:date>2023-04-25T19:54:00Z</dc:date>
    <item>
      <title>How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8949#M4466</link>
      <description>&lt;P&gt;I have data that looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;2021-11-25T19:00:00.000-0500
2021-03-03T13:00:00.000-0500
2021-03-09T15:00:00.000-0500
2021-03-13T16:00:00.000-0500
2021-03-19T03:00:00.000-0400
2021-05-28T03:00:00.000-0400&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is accurate, except I'm pulling the data to tableau server, and tableau displays all datetimes as UTC regardless of the local user's timezone. This reporting is leaving the local users confused, since the timestamps on the report do not match their timestamps for the process being reported (e.g. a user in Atlanta knows they started their process at 7:00AM, but the time in the tableau report is 12:00PM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to store the datetimes as the local time in databricks to work around this behavior, and have an additional column that stores the offset (like -5 for EST) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched so much and have no idea if I'm just asking the wrong question or approaching the problem wrong. &lt;B&gt;my end goal is displaying the correct date for every local user in tableau server. whatever the best practice is to accomplish this. &lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 19:33:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8949#M4466</guid>
      <dc:creator>jonathan-dufaul</dc:creator>
      <dc:date>2023-02-21T19:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8950#M4467</link>
      <description>&lt;P&gt;You have a couple options.  There is a &lt;A href="https://spark.apache.org/docs/2.3.0/api/sql/#from_utc_timestamp" alt="https://spark.apache.org/docs/2.3.0/api/sql/#from_utc_timestamp" target="_blank"&gt;sql function&lt;/A&gt; to change the time zone.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also &lt;A href="https://spark.apache.org/docs/latest/sql-ref-syntax-aux-conf-mgmt-set-timezone.html" alt="https://spark.apache.org/docs/latest/sql-ref-syntax-aux-conf-mgmt-set-timezone.html" target="_blank"&gt;set&lt;/A&gt; the time zone on the cluster &lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 12:24:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8950#M4467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-24T12:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8951#M4468</link>
      <description>&lt;P&gt;I am familiar with those but I believe they only work to change the timezone for the entire session/cluster. I have multiple timezones in the dataset from different sites throughout the USA. I want a column to be "local time" and then another column to be "what timezone is the local time in"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;local datetime                           timezone
2021-11-25T19:00:00.000        -0500
2021-03-03T13:00:00.000     -0500
2021-03-09T15:00:00.000     -0500
2021-03-13T16:00:00.000       -0500
2021-03-19T03:00:00.000      -0400
2021-05-28T03:00:00.000     -0400&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;local dateti                               timezone
2021-11-25T19:00:00.000       eastern
2021-03-03T13:00:00.000     eastern
2021-03-09T15:00:00.000     eastern
2021-03-13T16:00:00.000       eastern
2021-03-19T03:00:00.000      atlantic
2021-05-28T03:00:00.000     atlantic&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 14:43:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8951#M4468</guid>
      <dc:creator>jonathan-dufaul</dc:creator>
      <dc:date>2023-03-06T14:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8952#M4469</link>
      <description>&lt;P&gt;Hi @Jonathan Dufault​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everything is going great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 06:42:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8952#M4469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-22T06:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store timestamps using the local (not offset) timestamp instead of storing as UTC-Offset?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8953#M4470</link>
      <description>&lt;P&gt;The question is not resolved and my most recent reply shows exactly what I want the output to be for a set of inputs. I don't know what else I can do to make it clearer. &lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 19:54:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-store-timestamps-using-the-local-not-offset-timestamp/m-p/8953#M4470</guid>
      <dc:creator>jonathan-dufaul</dc:creator>
      <dc:date>2023-04-25T19:54:00Z</dc:date>
    </item>
  </channel>
</rss>

