Skip to main content
Contributor III
June 4, 2020

Technical Note: [FortiSOAR / Cybersponse Tricks'n'Tips] Jinja for changing the Timezone and formatting it.

  • June 4, 2020
  • 0 replies
  • 1080 views
Description

>>For changing the Timezone: By Taking the current UTC time >> {{arrow.utcnow().to('Asia/Dubai').format('YYYY-MM-DD HH:mm:ss')}} This will change the timezone to Asia/Dubai and format it. Other timezones can be like "Africa/Kampala", "Europe/London", "America/New_York" etc


>>For adding time in the current time like calculating SLA:  {{arrow.utcnow().replace(minutes=+(<TotalMinutes>)).timestamp}}. User can replace minutes,hours, weeks,days etc 
>>For subtracting time from the current time:  {{arrow.utcnow().replace(minutes=-(<TotalMinute>)).timestamp}}. User can replace minutes,hours, weeks,days etc 


Refer link for more details of the python Library



Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!