<?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 Getting epoch time in Webex Flow Designer using Pebble in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4664014#M3377</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to use the Cisco Developer API but in order to do so I want the current epoch time and the epoch time 24 hours ago - to be used in the to and from in my GraphQL query. I was wondering if it was possible to do this in the set variable block using Pebble syntax. Or even possible to do directly in the Curl request as Date.now() or something similar? Any advice would be great!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Donny Miller&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 01:39:47 GMT</pubDate>
    <dc:creator>donnytheguy</dc:creator>
    <dc:date>2022-08-05T01:39:47Z</dc:date>
    <item>
      <title>Getting epoch time in Webex Flow Designer using Pebble</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4664014#M3377</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to use the Cisco Developer API but in order to do so I want the current epoch time and the epoch time 24 hours ago - to be used in the to and from in my GraphQL query. I was wondering if it was possible to do this in the set variable block using Pebble syntax. Or even possible to do directly in the Curl request as Date.now() or something similar? Any advice would be great!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Donny Miller&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 01:39:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4664014#M3377</guid>
      <dc:creator>donnytheguy</dc:creator>
      <dc:date>2022-08-05T01:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting epoch time in Webex Flow Designer using Pebble</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4664628#M3378</link>
      <description>&lt;P&gt;Hi Donny,&lt;/P&gt;
&lt;P&gt;This does not exist today, we've opened up an enhancement internally to get it added. The pebble engine uses the SimpleDateFormatter class but does not use a getTime() method to allow for Date --&amp;gt; Epoch&lt;/P&gt;
&lt;P&gt;(ref:&amp;nbsp;&lt;A href="https://github.com/PebbleTemplates/pebble/blob/master/pebble/src/main/java/com/mitchellbosecke/pebble/extension/core/DateFilter.java" target="_blank"&gt;https://github.com/PebbleTemplates/pebble/blob/master/pebble/src/main/java/com/mitchellbosecke/pebble/extension/core/DateFilter.java&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;So it is likely that we will introduce another method, just like {{ now() }} that exists purely in Flow Engine to allow for both, epoch.now() and epoch.from(&amp;lt; Date Time String&amp;gt; )&lt;/P&gt;
&lt;P&gt;For now however, you can use an external API such as :&lt;/P&gt;
&lt;P class="p1"&gt;&lt;A href="https://worldtimeapi.org/api/timezone/America/Chicago" target="_blank"&gt;https://worldtimeapi.org/api/timezone/America/Chicago&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to get the epoch timestamp and then * 1000 for millis&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Arunabh.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 21:27:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4664628#M3378</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2022-08-05T21:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting epoch time in Webex Flow Designer using Pebble</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4756840#M3379</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;This was fixed - this is the way of getting the epoch timestamp in flow.&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;{{ now() | epoch }}&amp;nbsp;&amp;nbsp; =&amp;gt; default UTC timezone and in seconds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{{ now() | epoch(inMillis=true) }} =&amp;gt; default UTC timezone and in milliseconds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{{ '2017-10-19 16:18:03.779' | epoch(format='yyyy-MM-dd HH:mm:ss.SSS', inMillis=true) }} =&amp;gt; custom format and in milliseconds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{{ '2017-10-19 16:18:03.779' | epoch(format='yyyy-MM-dd HH:mm:ss.SSS', inMillis=true, timeZone='America/Phoenix') }} =&amp;gt; custom format with timezone and in milliseconds&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Arunabh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 15:21:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getting-epoch-time-in-webex-flow-designer-using-pebble/m-p/4756840#M3379</guid>
      <dc:creator>Arunabh Bhattacharjee</dc:creator>
      <dc:date>2023-01-18T15:21:55Z</dc:date>
    </item>
  </channel>
</rss>

