bug(material/datepicker): Re-evaluate how the MatDatepicker handles timezones
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
Documentation request
#### What is the expected behavior?
The moment object returned by selecting a date with Datepicker should have no timezone information (or UTC)
#### What is the current behavior?
Currently the moment object looks like this: Wed Apr 18 2018 00:00:00 GMT+0300
(The user is located in GMT+3, so his timezone is used)
#### What is the use-case or motivation for changing an existing behavior?
I wonder how to make my matDatepicker return UTC dates so that they are independent of the timezone the user is currently in. I've found lots of issues regarding this (https://github.com/angular/material2/issues/7167), but no clear and simple explanation on how to easily achieve that.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.2.0, Angular Material 6.0.0-beta.4, Typescript 2.5.3, ANY browser (not just IE!)
#### Is there anything else we should know?
I'm importing MatMomentDateModule, so all the dates in the app are momentjs dates.
Beitragsleitfaden
Rechercherichtung
Beginne mit der Dokumentation zu MatDatepicker und MatMomentDateModule und prüfe anschließend das zugehörige Issue #7167 auf bestehende Diskussionen zu Zeitzonen. Dokumentiere eine klare, unterstützte Möglichkeit, zeitzonenunabhängige oder UTC-Daten zu erhalten, einschließlich des erwarteten Verhaltens für moment-Werte; das Issue ist abgeschlossen, wenn Benutzer der Anleitung folgen können, ohne auf verstreute Issue-Kommentare angewiesen zu sein.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- documentation, frontend
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100