TZLOCALSTATUS
Classifies a local time as unique, gap (nonexistent) or fold (ambiguous)
Try it
When to use it
When should I call TZLOCALSTATUS before constructing a datetime?
Call it whenever user-entered wall-clock times may fall near a DST transition. A 'gap' result means the time does not exist and TZDATETIME will return #VALUE! with the reject policy; an 'ambiguous' result means you need to decide which UTC moment to use.
What is the difference between a 'gap' and a 'fold' status?
A 'gap' is a spring-forward transition where the clock jumps ahead and that wall-clock hour never occurs. A 'fold' is a fall-back transition where the clock repeats an hour, so that wall-clock time maps to two different UTC moments.
What does a 'unique' status mean for downstream calculations?
A 'unique' status means the local time is unambiguous and maps to exactly one UTC instant, so TZDATETIME can safely proceed with any policy.
Use cases
Validate a fall-back ambiguous time before storing
Confirm a mid-day time is unambiguous before conversion
Used in
Syntax
TZLOCALSTATUS(year,month,day,hour,minute,zone)