Skip to main content
Question

Set a field to 4:30PM today using pipelines (should be simple?)

  • February 3, 2022
  • 0 replies
  • 42 views

EdwardHefter
Forum|alt.badge.img+3
I am trying to use pipelines to set a "clock out time" of 4:30PM Eastern for all timecards that are still open at 9PM. I am setting up a pipeline to run at 9PM that searches all records where the Clock Out Time field isn't set and then putting a time in.

I am trying to use:
{{ (time.now|timezone('America/New_York')).date() + time.delta(hours=16, minutes=30) }}

When I do that, I get 16:30 UTC, not UTC Eastern Time. I can just offset by 5 hours and use "hours=21' but that will run into problems when we start using daylight savings time again.

How can I use today's date and 4:30PM regardless of what that is in UTC?

------------------------------
Edward Hefter
www.Sutubra.com
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
You can cheat and make a formula time of day field on the time card called [4:30 PM]

ToTimeOfDay("4:30 PM")

Then have the Pipeline use that field.  My Jinja skills are not good enough to help you fix your formula.

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------