Forum Discussion

EdwardHefter's avatar
EdwardHefter
Qrew Cadet
3 years ago

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

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
------------------------------
  • 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
    ------------------------------
    • EdwardHefter's avatar
      EdwardHefter
      Qrew Cadet
      Simple and works great - thanks again for the help, Mark! BTW, the use of a printed QR code to fill in a "temp table" and kick off a pipeline worked great for clocking in and out of different jobs.

      ------------------------------
      Edward Hefter
      www.Sutubra.com
      ------------------------------