Skip to content
This repository was archived by the owner on Jun 18, 2020. It is now read-only.
This repository was archived by the owner on Jun 18, 2020. It is now read-only.

Datetimeoffset strangeness #160

@patriksimek

Description

@patriksimek

Consider this TSQL code:

if convert(datetimeoffset(7), '2014-02-14 22:59:59.9999999 +05:00') = convert(datetimeoffset(7), '2014-02-14 17:59:59.9999999 +00:00')
    print 'EQUAL'

Dates are equal, but this simple query ...

select convert(datetimeoffset(7), '2014-02-14 22:59:59.9999999 +05:00') as dto1, convert(datetimeoffset(7), '2014-02-14 17:59:59.9999999 +00:00') as dto2

... returns this ...

{
    dto1: { Sat, 15 Feb 2014 03:59:59 GMT nanosecondsDelta: 0.0009999 },
    dto2: { Fri, 14 Feb 2014 17:59:59 GMT nanosecondsDelta: 0.0009999 }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions