According to Microsoft’s page on the datetimeoffset data type (see here):
A time zone offset specifies the zone offset from UTC for a time or datetime value.
But nowhere does it say whether the datetime part of the datetimeoffset string literal format is showing either:
- UTC time, with the timezone offset being what to apply to that time to get to localtime, or;
- localtime, with the timezone offset being what to apply to that time to get back to UTC.
This is the string literal format for datetimeoffset: YYYY-MM-DD hh:mm:ss[.nnnnnnn] [{+|-}hh:mm].
My question therefore is, is the YYYY-MM-DD hh:mm:ss[.nnnnnnn] bit of that string literal in localtime or in UTC?
The YYY-MM-DD hh:mm:ss[.nnnnnnn] [{+|-}hh:mm] format is an ISO8601 format. The ISO page gives
As this format has the offset then the base time is local. See wikipedia for other examples.