Forum Discussion
You can use strftime with something like this so it's nice and easy to read:
%w returns the weekday index with Sunday = 0 and Saturday = 6 so those are omitted, and then %-H returns the current 24 hour value of the current time. Keep in mind that Pipelines runs on UTC time for conversions so you need to convert 6:00 AM to UTC time for your filter. 6AM EST is 11AM UTC so you would put 11 instead of 19 from my screenshot.
------------------------------
Chayce Duncan
------------------------------
One caveat to this - this code does not adjust for daylight savings time. It was skipping at 6am, but now is skipping at 7am. I may just have to adjust this manually twice a year, or come up with another option.
------------------------------
Scott Dye
------------------------------
- DougHenning12 months agoCommunity Manager
You can specify a timezone when referencing the date/time which should help:
{{ time.now | timezone('America/Los_Angeles') }}
With that, you can adjust your expressions:
The "weekday()" function returns 0 for Monday, so you can use a single expression to skip weekends.
------------------------------
Doug Henning
------------------------------