Issue with Date/Time Functions

Thanks for the clarification, Peter.
With your second statement, it now all makes perfect sense.

The second statement is not clearly stated in all of the relevant Wiki articles.

I shall endeavor to make some updates to the wiki to make this clear.

Interesting point. I just ran a test, and it seems that the token %ICUDateTimeFor% seems to account for DST:

  • For a date in June, it subtracted 5 hours
  • For a date in December, it subtracted 6 hours
--- USE GMTOFFSET() TO ADJUST TIME(m,d,y,h,m,s) USE ---

NO OFFSET -- TIME(2016,06,01) ---
Tue, May 31, 2016 7:00 PM

USING OFFSET -- ICUDateTimeFor%TIME(2016,06,01) - (GMTOFFSET())%EEE, MMM d, yyyy h:mm a%
Wed, Jun 1, 2016 1:00 AM

NO OFFSET -- TIME(2016,12,01) ---
Wed, Nov 30, 2016 6:00 PM

USING OFFSET -- ICUDateTimeFor%TIME(2016,12,01) - (GMTOFFSET())%EEE, MMM d, yyyy h:mm a%
Thu, Dec 1, 2016 12:00 AM

Thus, subtracting GMTOFFSET() from a date that is in DST but the current date is NOT in DST, will result in the date being 1 hour later.

In both cases, it ensures the adjusted date is the same day as what was entered in the TIME(y,m,d) function.