Add Subtract Time Variables in Apps

After a week of trying this or that I think I found a way.

    def today = timeToday(null, location.timeZone)
    use (groovy.time.TimeCategory)
    {
        newDate1 = today+3.hours
    }
  
   logMsg "New Date: " + newDate1

Not sure if using use (groovy.time.TimeCategory) several times in an app will cause issue, or is there a way to import it in the header.

1 Like