I have to add default value to a datetime column with UTC time with Timezone, right now I am using the GETUTCDATE()
in default constraint, but it is not adding the timezone information to the column.
Please help me.
The type that includes timezone information (specifically, the offset) is datetimeoffset. GETUTCDATE returns a plain old DATETIME
which has no timezone indication, not even a Local vs UTC indicator.
If you care about timezones and offsets, use a datetimeoffset
column and ` SYSDATETIMEOFFSET as its default