This follows on from trying to calculate number of days until a deadline. This could be an issue due to daylight savings.
In my workflow I have a variable that picks up the Target Time
attribute. I then use the Date() computational helper to convert that to a Date but it is giving the wrong date in places when the Target Time is set to midnight BST:
- 15 April 2024 15:30 → 15/04/2024 Correct
- 10 April 2024 01:00 → 10/04/2024 Correct
- 27 March 2024 00:00 → 27/03/2024 Correct - during winter before clocks change
- 11 April 2024 00:55 → 10/04/2024 INCORRECT - changes to the day previously.
I have tried using the Ceiling() computational helper to round the Target Time up to the end of the day. I have tried this using Ceiling(targetTime, Min)
but I end up with the error:
"error": {
"category": "WorkflowMalformed",
"errorCode": "E1586175934",
"errorData": {
"missingReferences": [
{
"definition": "variable 'ceilingTime'",
"missingReferencedVariables": [
"Ceiling",
"Min"
]
}
]
},
"httpStatusCode": 400,
"message": "In action designs_workflowEditItemAction, there are references to variables that do not exist."
},
What is the appropriate way to manage DateTimes across daylight savings or round up to the end of the day.