<?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 Add-on builder: how to convert unix timestamp into UTC for a checkpoint and how to use Date.now() in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Add-on-builder-how-to-convert-unix-timestamp-into-UTC-for-a/m-p/583652#M10378</link>
    <description>&lt;P&gt;So I'm trying to setup REST API calls with Add-on Builder and it&amp;nbsp;requires two params: 'fromDate' and 'toDate'. So I ran into 2 problems:&lt;/P&gt;&lt;P&gt;1) &amp;nbsp;'toDate' in my case is time/date now (at the moment of API call). Is it possible to set up this param to something like Date.now() in JavaScript?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) 'fromDate' should be a c&lt;SPAN&gt;heckpoint taken from the last record in the last response. The problem is that in the response this timestamp is in UNIX format. And for request, it should be UTC&amp;nbsp;%d/%m/%y%H%M. How can I convert UNIX into UTC? + can I add an additional second to this extracted timestamp so my data won't overlap?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Feb 2022 23:01:07 GMT</pubDate>
    <dc:creator>TKelly</dc:creator>
    <dc:date>2022-02-04T23:01:07Z</dc:date>
    <item>
      <title>Add-on builder: how to convert unix timestamp into UTC for a checkpoint and how to use Date.now()</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Add-on-builder-how-to-convert-unix-timestamp-into-UTC-for-a/m-p/583652#M10378</link>
      <description>&lt;P&gt;So I'm trying to setup REST API calls with Add-on Builder and it&amp;nbsp;requires two params: 'fromDate' and 'toDate'. So I ran into 2 problems:&lt;/P&gt;&lt;P&gt;1) &amp;nbsp;'toDate' in my case is time/date now (at the moment of API call). Is it possible to set up this param to something like Date.now() in JavaScript?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) 'fromDate' should be a c&lt;SPAN&gt;heckpoint taken from the last record in the last response. The problem is that in the response this timestamp is in UNIX format. And for request, it should be UTC&amp;nbsp;%d/%m/%y%H%M. How can I convert UNIX into UTC? + can I add an additional second to this extracted timestamp so my data won't overlap?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 23:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Add-on-builder-how-to-convert-unix-timestamp-into-UTC-for-a/m-p/583652#M10378</guid>
      <dc:creator>TKelly</dc:creator>
      <dc:date>2022-02-04T23:01:07Z</dc:date>
    </item>
  </channel>
</rss>

