<?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: XQL Query UTC Time Help in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551795#M112329</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/80673"&gt;@Brad.Herbert&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Should&amp;nbsp;&lt;/EM&gt;be able to use 'timezone = "America/Chicago" ' to return the result in the given timezone instead of UTC. Obviously adjust the timezone as needed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2023 15:28:54 GMT</pubDate>
    <dc:creator>BPry</dc:creator>
    <dc:date>2023-07-31T15:28:54Z</dc:date>
    <item>
      <title>XQL Query UTC Time Help</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551646#M112303</link>
      <description>&lt;P&gt;We're capturing windows event 4800 and 4801 (Windows Locked and Windows Unlocked) and are working to build a report on it for the previous day, midnight to midnight.&amp;nbsp; I've got the query setup exactly as we want, however are struggling to get around UTC.&amp;nbsp; Does anyone have a good method to get around UTC?&amp;nbsp; Obviously, when I Run the report in XQL, results are correct because the platform is adjusting for the times, but when scheduling it to run, it's pulling UTC Time in the emailed report.&amp;nbsp; Surely someone has a method to adjust?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset = xdr_data &lt;BR /&gt;| alter username = lowercase(json_extract_scalar(action_evtlog_data_fields, "$.TargetUserName"))&lt;BR /&gt;| join conflict_strategy = left type = inner (preset = ad_users ) as users lowercase(users.sam_account_name) = username&lt;/P&gt;
&lt;P&gt;| filter event_type = ENUM.EVENT_LOG &lt;BR /&gt;| filter action_evtlog_event_id = 4800 or &lt;BR /&gt;action_evtlog_event_id = 4801 &lt;BR /&gt;| alter Workstation_Status = If (action_evtlog_event_id = 4800,"Workstation Locked", &lt;BR /&gt;if (action_evtlog_event_id = 4801, "Workstation Unlocked", "Null")) &lt;BR /&gt;| fields _time, agent_hostname, display_name, Workstation_Status, action_evtlog_event_id &lt;BR /&gt;| sort asc display_name, desc _time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 19:41:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551646#M112303</guid>
      <dc:creator>Brad.Herbert</dc:creator>
      <dc:date>2023-07-28T19:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: XQL Query UTC Time Help</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551795#M112329</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/80673"&gt;@Brad.Herbert&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Should&amp;nbsp;&lt;/EM&gt;be able to use 'timezone = "America/Chicago" ' to return the result in the given timezone instead of UTC. Obviously adjust the timezone as needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 15:28:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551795#M112329</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2023-07-31T15:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: XQL Query UTC Time Help</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551796#M112330</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/43480"&gt;@BPry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yeah, that's kind of what we did.&amp;nbsp; Below is the final query we've scheduled...Pretty nice report for those that have Remote Employees that aren't really working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config timeframe = 2d&lt;BR /&gt;|dataset = xdr_data &lt;BR /&gt;| alter username = lowercase(json_extract_scalar(action_evtlog_data_fields, "$.TargetUserName"))&lt;BR /&gt;| alter Actual_Time = format_timestamp("%Y/%m/%d %H:%M:%S", _time, "America/Indiana/Indianapolis") &lt;BR /&gt;| join conflict_strategy = left type = inner (preset = ad_users ) as users lowercase(users.sam_account_name) = username &lt;BR /&gt;| filter _time &amp;gt;= to_timestamp(subtract(to_epoch(date_floor(current_time(), "d", "America/Indiana/Indianapolis"), "SECONDS"), 86400), "SECONDS")&lt;BR /&gt;| filter _time &amp;lt;= date_floor(current_time(), "d", "America/Indiana/Indianapolis")&lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG &lt;BR /&gt;| filter action_evtlog_event_id = 4800 or &lt;BR /&gt;action_evtlog_event_id = 4801 or &lt;BR /&gt;action_evtlog_event_id = 4634&lt;BR /&gt;| filter security_group_list contains "***" or&lt;BR /&gt;security_group_list contains "***"&lt;BR /&gt;| filter (agent_ip_addresses contains """10.100.5""") &lt;BR /&gt;| alter Workstation_Status = If (action_evtlog_event_id = 4800,"Workstation Locked", &lt;BR /&gt;if (action_evtlog_event_id = 4801, "Workstation Unlocked", &lt;BR /&gt;if (action_evtlog_event_id = 4634, "Windows Logon", "Null")))&lt;BR /&gt;| fields -_time&lt;BR /&gt;| fields Actual_Time, display_name, Workstation_Status&lt;BR /&gt;| sort asc display_name, desc Actual_Time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*** Enter the Security Group from AD&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 15:36:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/xql-query-utc-time-help/m-p/551796#M112330</guid>
      <dc:creator>Brad.Herbert</dc:creator>
      <dc:date>2023-07-31T15:36:03Z</dc:date>
    </item>
  </channel>
</rss>

