<?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: Converting PST to UTC in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463091#M85891</link>
    <description>&lt;P&gt;Pacific Standard Time(PST) is 8 hours behind the Coordinated Universal Time (UTC). Looking at the value of &lt;STRONG&gt;current_date_utc&lt;/STRONG&gt;, it looks like your system is using Pacific Daylight Time (PDT) which is 7 hours behind UTC. You need to use PDT instead of PST in time conversion. Google PST vs PDT to understand differences.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval START_TIME= "01-APR-2020 20:30:21"
| eval myUTCtimeEpoch=round(strptime(START_TIME." PDT","%d-%b-%Y %H:%M:%S %Z"))
| eval myUTCtime=strftime(myUTCtimeEpoch,"%d-%B-%Y %H:%M:%S %Z")
| eval current_date_utc = strftime(round(now()),"%m/%d/%Y %H:%M:%S %Z")
| table START_TIME current_date myUTCtime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:51:41 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2020-09-30T04:51:41Z</dc:date>
    <item>
      <title>Converting PST to UTC</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463090#M85890</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to convert current PST time to UTC. I have written below code. &lt;BR /&gt;
But when I compare with current time in UTC, there is a difference between two. They are not same.&lt;/P&gt;

&lt;P&gt;Please let me know if I am missing anything&lt;/P&gt;

&lt;P&gt;STRT_TIME = 01-APR-2020 20:30:21  ( Current PST time search from google)&lt;/P&gt;

&lt;P&gt;| eval START_TIME= "01-APR-2020 20:30:21"&lt;BR /&gt;
| eval myUTCtimeEpoch=round(strptime(START_TIME." PST","%d-%B-%Y %H:%M:%S %Z"))&lt;BR /&gt;
| eval myUTCtime=strftime(myUTCtimeEpoch,"%d-%B-%Y %H:%M:%S %Z")&lt;BR /&gt;
| eval current_date_utc = strftime(round(now()),"%m/%d/%Y %H:%M:%S %Z")&lt;BR /&gt;
| table START_TIME current_date myUTCtime&lt;/P&gt;

&lt;P&gt;Result:&lt;/P&gt;

&lt;P&gt;STRT_TIME = 01-APR-2020 20:30:21&lt;BR /&gt;
myUTCtime = 02-April-2020 04:30:21 UTC&lt;BR /&gt;
current_date_utc = 04/02/2020 03:30:21 UTC&lt;/P&gt;

&lt;P&gt;Above, I was expecting current_date_utc and myUTCtime to be same but there is 1 hour difference between them.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:48:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463090#M85890</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-09-30T04:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Converting PST to UTC</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463091#M85891</link>
      <description>&lt;P&gt;Pacific Standard Time(PST) is 8 hours behind the Coordinated Universal Time (UTC). Looking at the value of &lt;STRONG&gt;current_date_utc&lt;/STRONG&gt;, it looks like your system is using Pacific Daylight Time (PDT) which is 7 hours behind UTC. You need to use PDT instead of PST in time conversion. Google PST vs PDT to understand differences.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval START_TIME= "01-APR-2020 20:30:21"
| eval myUTCtimeEpoch=round(strptime(START_TIME." PDT","%d-%b-%Y %H:%M:%S %Z"))
| eval myUTCtime=strftime(myUTCtimeEpoch,"%d-%B-%Y %H:%M:%S %Z")
| eval current_date_utc = strftime(round(now()),"%m/%d/%Y %H:%M:%S %Z")
| table START_TIME current_date myUTCtime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:51:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463091#M85891</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-09-30T04:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Converting PST to UTC</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463092#M85892</link>
      <description>&lt;P&gt;Hi Manjunathmeti, Thank you very much for this clarification&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Puru&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:57:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Converting-PST-to-UTC/m-p/463092#M85892</guid>
      <dc:creator>purushot1234</dc:creator>
      <dc:date>2020-04-02T15:57:05Z</dc:date>
    </item>
  </channel>
</rss>

