Skip to content

Cosmos: DateTimeOffset with non-zero offsets are not supported by functions #35310

@roji

Description

@roji

The Cosmos provider allows inserting DateTimeOffsets with arbitrary offsets, but the Cosmos functions don't appear to support them:

SELECT DateTimePart('hh', '2020-01-01 12:30:15') -- 12
SELECT DateTimePart('hh', '2020-01-01 12:30:15Z') -- 12
SELECT DateTimePart('hh', '2020-01-01 12:30:15+02:00') -- undefined

Unfortunately, even for zero offsets, we generate e.g. 0010-05-03T12:45:38+00:00, which isn't supported; we need to generate 0010-05-03T12:45:38Z instead. We could consider not allowing DateTimeOffsets with non-zero offsets.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions