-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-model-binding
Milestone
Description
Describe the bug
When a user passes a UTC time string as query parameter of a GET request, the model binder converts it to a "Local" kind DateTime object rather than a UTC DateTime object. And the user has to call DateTime.ToUniversalTime() to convert it to utc time, or write custom model binder to change the behaviour globally.
To Reproduce
Steps to reproduce the behavior:
- Send a GET request to an endpoint with a UTC time string such as
https://<something>.com/{action}/{id}?time=2019-06-14T02:30:04.0576719Z
- The
time
parameter in the corresponding controller is a local time
Expected behavior
The retrieved time
should be a utc time.
colotiline, kstruempf, levinhtin, ne4ta, ahsteele and 36 more
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-model-binding