Home Consulting Training Blog FREE Tips & Tools Login

Time Zone Troubles? Fix it with Jinja in Pipelines

Subscribe on YouTube

>> Get the Jinja Date & Time Cheat Sheet <<

Accessing the current date/time in Pipelines using Jinja can be SUPER helpful, but if you don't convert it to your local time zone... it can be SUPER frustrating.

When using the {{ time.now }} Jinja template, you may not immediately notice that you have a time zone issue.

For me on Pacific Time, I'm currently 7 hours behind the UTC time that this template returns... so it's only after 5 PM that I start having issues (when referencing just the date).

Basically, any pipeline running after 5 PM time will use the next day's values 😱

This is a problem. (read more about it)

We can fix this with the Jinja timezone filter. 

Apply Time Zones, such as:

  • Eastern
  • Central
  • Mountain
  • Pacific
  • Plus many more!

How to use the Jinja timezone filter

To add the timezone filter to your {{ time.now }} templates you'll include a "pipe" symbol followed by the 'timezone' function and then the properly formatted time zone within a set of parentheses and single quotations.

Here are several common examples:

Eastern

{{ time.now|timezone('America/New_York') }}

Central

{{ time.now|timezone('America/Chicago') }}

Mountain

{{ time.now|timezone('America/Denver') }}

Pacific

{{ time.now|timezone('America/Los_Angeles') }}


For more time zones use the "TZ database names "column on this Wikipedia page.

What's even better, most of these time zones adjust for daylight savings too!

 

Did you know Quick Base Junkie has online training programs?
Topics include Relationships, Formulas, HTML, Jinja, APIs, and MORE! 

 

For more information on Jinja see the resources below, or skip right to the good stuff and get the Intro to Jinja for Pipelines course today!

 

RESOURCES:

Get the FREE Jinja Date & Time Cheat Sheet mentioned in this video

Lookup additional Time Zones

Learn more about how Jinja works in Pipelines

Adjust dates & times using Jinja

 

Feeling like a Junkie?  Subscribe Now!

Don't miss the latest:

Tips, shortcuts, checklists, reviews, tutorials, and courses from Quick Base Junkie!

Subscribe now to stay in touch

Don't worry, your information will not be shared.

Subscribe

Already subscribed?

Take your Quick Base skills to the next level with Premium Courses.

Explore Courses Now
Close

Don't miss the latest:

Tips, shortcuts, reviews, tutorials, and courses from Quick Base Junkie!

Sign up now to stay in touch

(unsubscribe anytime)