<?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: SAS VIYA4 now() returns wrong time in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965247#M18736</link>
    <description>&lt;P&gt;It looks like NOW() is a Visual Analytics function, not a SAS language function.&amp;nbsp; I'm going to try moving this question the visual analytics community.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Apr 2025 13:33:17 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2025-04-28T13:33:17Z</dc:date>
    <item>
      <title>SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965242#M18734</link>
      <description>&lt;P&gt;When using the function now() in SAS VIYA 4 (building a report and making a calculated item to determine something is in the past or the future) I see rows up to 1 hour in the past that still get seen as in the future. So now() is reporting a time that is 1 hour before the real current datetime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course I immediately thought it had to do with DST or something like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using Studio the datetime() function returns the correct system-datetime.&lt;/P&gt;&lt;P&gt;Jobs that produce the data and writes the CAS-tables also use the correct datetime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the servers used, are set to the right time (according to administrators).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried setting DST_Enabled to True in the Environment Manager, but that didn't do the trick. At least, an administrator did that for me, as I am not allowed to go there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how I could get the now()-function to return the correct time?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 12:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965242#M18734</guid>
      <dc:creator>P3</dc:creator>
      <dc:date>2025-04-28T12:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965243#M18735</link>
      <description>&lt;P&gt;I see no entry for a NOW function in the SAS documentation.&lt;/P&gt;
&lt;P&gt;So this is either an undocumented function (which should not be trusted), or something created with PROC FCMP at your site (go looking for the source code).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 12:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965243#M18735</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-04-28T12:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965245#M18738</link>
      <description>&lt;P&gt;In my SAS Viya 4, I get errors when I run the NOW() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1745846356653.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106562iE4072731285F8B2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1745846356653.png" alt="PaigeMiller_0-1745846356653.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you want the TIME() function, or as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;someone has created that for all users using PROC FCMP. In that case, if the time is one hour off, that should be easy for you to adjust.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 13:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965245#M18738</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-28T13:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965247#M18736</link>
      <description>&lt;P&gt;It looks like NOW() is a Visual Analytics function, not a SAS language function.&amp;nbsp; I'm going to try moving this question the visual analytics community.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 13:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965247#M18736</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2025-04-28T13:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965248#M18739</link>
      <description>&lt;P&gt;Apologies&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&amp;nbsp; When I moved this to visual analytics, I accidentally moved your reply first, so you're now the owner of the thread, instead of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/475047"&gt;@P3&lt;/a&gt;&amp;nbsp;who asked the question.&amp;nbsp; I don't see a way to make the original question the question again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 13:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965248#M18739</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2025-04-28T13:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965249#M18740</link>
      <description>&lt;P&gt;The Now() function in VA can be controlled by a JVM property timezone setting for the reportExecution service/pod described here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/vacdc/v_029/varef/p1t3sqzzeb69h1n1t52gw8nr73eb.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/vacdc/v_029/varef/p1t3sqzzeb69h1n1t52gw8nr73eb.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this property is not defined for the service, then it defaults to the timezone of the report execution pod, which you could check with this kubectl command:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;kubectl -n &amp;lt;namespace&amp;gt; exec &amp;lt;report execution pod name&amp;gt; -- date&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;where namespace and report execution pod name are the right values for your environment. I suspect though you just need to set the JVM property from the link above to your timezone and that should do the trick.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 13:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965249#M18740</guid>
      <dc:creator>HunterT_SAS</dc:creator>
      <dc:date>2025-04-28T13:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965345#M18741</link>
      <description>&lt;P&gt;Couldn't find the reportExecution configuration. But I just heard that we are running on VIYA 3.5. So maybe it is a newer option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 08:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965345#M18741</guid>
      <dc:creator>P3</dc:creator>
      <dc:date>2025-04-29T08:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965362#M18742</link>
      <description>&lt;P&gt;Oh yes Viya 3.5 is going to be a little different here. Are you (or the server technically) in the CEST timezone by any chance? If so there was a bug in Viya 3.5 where it is an hour off and you can workaround it following these steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Modify casconfig_usermods.lua on controller node,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•Edit this file: /opt/sas/viya/config/etc/cas/default/casconfig_usermods.lua&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•Set this property: cas.TIMEZONE='Europe/Amsterdam'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•Restart CAS controller&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Otherwise it should be pulling the time from the Viya 3.5 server itself (wherever CAS is running).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 14:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965362#M18742</guid>
      <dc:creator>HunterT_SAS</dc:creator>
      <dc:date>2025-04-29T14:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA4 now() returns wrong time</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965418#M18743</link>
      <description>&lt;P&gt;That did the trick. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 13:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VIYA4-now-returns-wrong-time/m-p/965418#M18743</guid>
      <dc:creator>P3</dc:creator>
      <dc:date>2025-04-30T13:46:42Z</dc:date>
    </item>
  </channel>
</rss>

