The more I work with them, the more I see that the different date functions are not agreeing with one another. As an example, if you evaluate the expression:
{DATEADD(Seconds|{DATEFORMAT(yyyy-MM-ddTHH:mm:ss.fffZ)}|yyyy-MM-ddTHH:mm:ss.fffZ|1|yyyy-MM-ddTHH:mm:ss.fffZ)}
It
should return the current date/time plus one second. However, for me (at UTC -04) it is returning a time 4 hours in the past.
The inner expression {DATEFORMAT(yyyy-MM-ddTHH:mm:ss.fffZ)} will return my local time, but with a Z at the end. (Which incorrectly indicates that it is UTC time.)
The outer expression {DATEADD(Seconds|...|yyyy-MM-ddTHH:mm:ss.fffZ|1|yyyy-MM-ddTHH:mm:ss.fffZ)} correctly interprets the Z as UTC, then converts it back to my local time by subtracting 4 hours.
In order for this to work, I need to have some way to return the current date/time in UTC, or to convert any date to UTC. I can't simply add 4 hours, because that value is not a constant. (Changes with Daylight Savings) Additionally, this will be deployed on machines across different timezones.