<?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: Change {{job.start_time.[iso_date]}} Timezone in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67685#M33418</link>
    <description>&lt;P&gt;Hi, all the dynamic values are in UTC (&lt;A href="https://docs.databricks.com/en/workflows/jobs/parameter-value-references.html#supported-value-references" target="_self"&gt;documentation&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Maybe you can use the code like the one presented below + pass the variables between tasks (see &lt;A href="https://docs.databricks.com/en/workflows/jobs/share-task-context.html" target="_self"&gt;Share information between tasks in a Databricks&lt;/A&gt; job) ?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;%python
from datetime import datetime, timedelta

# Get the current date
current_date = datetime.now()

# Subtract one day to get the previous day or make any other shift
previous_day = current_date - timedelta(days=1)

# Format the date as a string in the desired format if needed
previous_day_str = previous_day.strftime('%Y-%m-%d')

# Now you can use previous_day_str as a dynamic variable in your notebook logic&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2024 14:19:26 GMT</pubDate>
    <dc:creator>artsheiko</dc:creator>
    <dc:date>2024-04-30T14:19:26Z</dc:date>
    <item>
      <title>Change {{job.start_time.[iso_date]}} Timezone</title>
      <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67634#M33395</link>
      <description>&lt;P&gt;I am trying to schedule some jobs using workflows and leveraging dynamic variables. One caveat is that when I try to use&amp;nbsp;&lt;SPAN&gt;{{job.start_time.[iso_date]}} it seems to be defaulted to UTC, is there a way to change it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 02:09:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67634#M33395</guid>
      <dc:creator>QuantumFries</dc:creator>
      <dc:date>2024-04-30T02:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change {{job.start_time.[iso_date]}} Timezone</title>
      <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67676#M33412</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AviralBhardwaj_0-1714482356500.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7317iF3C2C69494EFB55A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="AviralBhardwaj_0-1714482356500.png" alt="AviralBhardwaj_0-1714482356500.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Try to use this configuration let me know your finding here&lt;BR /&gt;&lt;BR /&gt;spark configuration page-&amp;nbsp;&lt;A href="https://spark.apache.org/docs/latest/configuration.html" target="_blank"&gt;https://spark.apache.org/docs/latest/configuration.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 13:08:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67676#M33412</guid>
      <dc:creator>Aviral-Bhardwaj</dc:creator>
      <dc:date>2024-04-30T13:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change {{job.start_time.[iso_date]}} Timezone</title>
      <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67685#M33418</link>
      <description>&lt;P&gt;Hi, all the dynamic values are in UTC (&lt;A href="https://docs.databricks.com/en/workflows/jobs/parameter-value-references.html#supported-value-references" target="_self"&gt;documentation&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Maybe you can use the code like the one presented below + pass the variables between tasks (see &lt;A href="https://docs.databricks.com/en/workflows/jobs/share-task-context.html" target="_self"&gt;Share information between tasks in a Databricks&lt;/A&gt; job) ?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;%python
from datetime import datetime, timedelta

# Get the current date
current_date = datetime.now()

# Subtract one day to get the previous day or make any other shift
previous_day = current_date - timedelta(days=1)

# Format the date as a string in the desired format if needed
previous_day_str = previous_day.strftime('%Y-%m-%d')

# Now you can use previous_day_str as a dynamic variable in your notebook logic&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:19:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67685#M33418</guid>
      <dc:creator>artsheiko</dc:creator>
      <dc:date>2024-04-30T14:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change {{job.start_time.[iso_date]}} Timezone</title>
      <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67954#M33488</link>
      <description>&lt;P&gt;The configurations did not work. Once the job cluster starts, it leverages the input which is already set. I did not try to set this in the init_script, but I believe it would be the same behavior.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 14:33:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67954#M33488</guid>
      <dc:creator>QuantumFries</dc:creator>
      <dc:date>2024-05-02T14:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Change {{job.start_time.[iso_date]}} Timezone</title>
      <link>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67955#M33489</link>
      <description>&lt;P&gt;This does work, I think I will leverage something like this even thought it is a bit hacky.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 14:35:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/change-job-start-time-iso-date-timezone/m-p/67955#M33489</guid>
      <dc:creator>QuantumFries</dc:creator>
      <dc:date>2024-05-02T14:35:10Z</dc:date>
    </item>
  </channel>
</rss>

