Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RowReader.dateTime should return DateTimeKind.Utc #105

Open
peterhirn opened this issue Jan 9, 2022 · 0 comments
Open

RowReader.dateTime should return DateTimeKind.Utc #105

peterhirn opened this issue Jan 9, 2022 · 0 comments

Comments

@peterhirn
Copy link

I think reader.dateTime should always return dates with DateTimeKind.Utc. Otherwise this leads to problems downstream as eg. Json serialization will not append 'Z' to the string which will then be considered local-time by browsers and prevent correct conversion to actual local time.

Alternatively an additional function dateTimeUtc could be added.

Workaround

type RowReader with
    member this.dateTimeUtc(column: string) : DateTime =
        DateTime.SpecifyKind(this.dateTime column, DateTimeKind.Utc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant