<?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: Arcade on Calculate Field does not respect the Time Zone of Windows in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057500#M40878</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/135154"&gt;@Jelle_Stu_PR&lt;/a&gt;,&amp;nbsp;still the same. I will dig deeper.&lt;/P&gt;</description>
    <pubDate>Thu, 13 May 2021 06:20:58 GMT</pubDate>
    <dc:creator>VHolubec</dc:creator>
    <dc:date>2021-05-13T06:20:58Z</dc:date>
    <item>
      <title>Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057333#M40859</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a FGDB to which I add a date Field. I tried to calculate the current day and time, but I was not able to get the correct results.&lt;/P&gt;&lt;P&gt;The function Now() get me the current day, but the time in UTC instead of UTC+2&lt;/P&gt;&lt;P&gt;The function Today() give me yesterday date and time 22:00.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I something wrong, or these two functions needs to be added with something?&lt;/P&gt;&lt;P&gt;My workflow is also in attached video.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Vladimir&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6253906870001w1040h540r128" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6253906870001" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6253906870001w1040h540r128');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6253906870001"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 19:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057333#M40859</guid>
      <dc:creator>VHolubec</dc:creator>
      <dc:date>2021-05-12T19:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057384#M40868</link>
      <description>&lt;P&gt;Just test here&amp;nbsp; and now...&lt;/P&gt;&lt;P&gt;python works with datetime.datetime.now()&lt;/P&gt;&lt;P&gt;arcade doesn't&amp;nbsp; with Now()&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 21:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057384#M40868</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-12T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057391#M40870</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;, sorry I forgot to add, yes the Python function works great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 21:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057391#M40870</guid>
      <dc:creator>VHolubec</dc:creator>
      <dc:date>2021-05-12T21:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057405#M40872</link>
      <description>&lt;P&gt;problem solved! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 22:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057405#M40872</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-12T22:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057414#M40873</link>
      <description>&lt;P&gt;What happens if you add the &lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal" target="_self"&gt;ToLocal&lt;/A&gt; function?&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 13:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057414#M40873</guid>
      <dc:creator>Jelle_Stu_PR</dc:creator>
      <dc:date>2021-05-13T13:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057500#M40878</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/135154"&gt;@Jelle_Stu_PR&lt;/a&gt;,&amp;nbsp;still the same. I will dig deeper.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 06:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057500#M40878</guid>
      <dc:creator>VHolubec</dc:creator>
      <dc:date>2021-05-13T06:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057605#M40889</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/78925"&gt;@VHolubec&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;In a web map when calculating the local time using "ToLocal(Now())" would work and therefore I am a bit surprised why it still returns the UTC time when you do this. I just tested this and that's what happend.&amp;nbsp;&amp;nbsp;@Anonymous User&amp;nbsp;any idea why?&lt;/P&gt;&lt;P&gt;There is a tool that allows you to convert time between time zones (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/convert-timezone.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/convert-timezone.htm&lt;/A&gt;&amp;nbsp;) but to be honest the time zone selection is not very user friendly (for instance I couldn't find the Colombian time zone).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way is using the DateAdd() function to manually change the time zone. I used this in my case:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DateAdd($feature.DateTime, 7, 'hours')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, there is something you need to keep in mind. If you live in a country with daylight savings, losing the reference to UTC might create errors in interpretations later on. There should be an option in the configuration that defines how you want to see the data times (in UTC or convert to local time zone). There are some options when you enable time on your layer, but if you don't want to do that, it should be possible to see the date and time as the user wants.&amp;nbsp;@Anonymous User&amp;nbsp;what are your ideas on this?&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 13:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057605#M40889</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-05-13T13:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057871#M40915</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/78925"&gt;@VHolubec&lt;/a&gt;&amp;nbsp;- here is my take on the situation:&lt;/P&gt;&lt;P&gt;By itself, &lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#now" target="_blank" rel="noopener"&gt;Now()&lt;/A&gt; should return the local time. In the ArcGIS Pro pop-up profile and ArcGIS Online calculate field, it returns the expected local time for me. When calculating a field with Now() in Pro, I am also reproducing the behavior where the value is returned in UTC. Since Now() should always return the local time based on the system's time, I think this could be a bug with calculating fields in Pro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A couple things to keep in mind though: if you are calculating this value on an ArcGIS Online hosted feature layer, you want it to be in UTC time. The reason for this is that all date values in a hosted feature layer are in UTC and the browser converts them to local time when viewing. Pro does not apply the same conversion when viewing date fields. So if you calculate into local time instead of UTC in Pro, then your field will show the incorrect time in web apps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a local dataset, I don't see any reasons for not using the DateAdd function shown above. Just make sure that when publishing as a web layer, you specify the time zone your date field is in. In the publishing process, your field will be stored in UTC with an offset applied, but will display in your local time zone in apps.&lt;/P&gt;&lt;P&gt;For example, I'm in Pacific Time (right now UTC-7). If I have my date field locally and the time is 2:30pm for a feature, then I publish to ArcGIS Online and specify my time zone, in the Online database that date field will now be 9:30 p.m., stored in UTC. However since my browser is UTC-7, when I go to view that date field in a map/app it will subtract 7 hours and show me the right value of 2:30 p.m.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps -- this is a &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/sharing-collaboration/mastering-the-space-time-continuum-considerations-for-publishing-date-fields-to-the-web/" target="_blank" rel="noopener"&gt;great blog on time&lt;/A&gt; that you've probably read too.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Peter&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 21:53:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057871#M40915</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-13T21:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057921#M40921</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;@Anonymous User&amp;nbsp;for jumping in.&lt;/P&gt;&lt;P&gt;Will you get back when you know if the behaviour in Pro is indeed a bug?&lt;/P&gt;&lt;P&gt;It would be nice to have a setting in ArcGIS Pro where the user can decide in what time zone he/she wants to see a date-time. Do you know if this is on the roadmap?&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 23:08:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057921#M40921</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-05-13T23:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade on Calculate Field does not respect the Time Zone of Windows</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057965#M40925</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User&amp;nbsp;, Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;thank you both, I send it to our tech support! The commnad:&amp;nbsp;DateAdd(Now(), 2, 'hours'), works also fine!&lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 07:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-on-calculate-field-does-not-respect-the/m-p/1057965#M40925</guid>
      <dc:creator>VHolubec</dc:creator>
      <dc:date>2021-05-14T07:23:24Z</dc:date>
    </item>
  </channel>
</rss>

