[DatePicker] Single DateSelector Conversion time zone error
See original GitHub issueDescription: setSelection in SingleDateSelector converts date in UTC date. Assume a scenario where the user is in India (+5:30). The time is 13/jul/2020 5am local time. setSelection in SingleDateSelector is giving in mill sec the function creates a calender object at UTC the date would be 12/jul/2020 . The selected date in the ui would be 12/jul/2020 rather than 13/jul/2020 which was the input.
Expected behavior: expected behavior should be date should be converted based on system default setting rather than UTC.
Source code:
@Override
public void setSelection(@Nullable Long selection) {
selectedItem = selection == null ? null : UtcDates.canonicalYearMonthDay(selection);
}
Material Library version: Material Android Library version you are using here 1.1.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Not able to set default time zone for date picker #1787 - GitHub
Since the inputs are converted internally, the UI elements will adjust the time based on the UTC offset. Output dates (e.g. onChange call...
Read more >jQuery Date Picker - TimeZone Issue - Stack Overflow
When they select a time from the datepicker, just pass it back as is (if they selected 9PM, just pass back 9PM). On...
Read more >Date Picker Sends Wrong Date - Power Platform Community
But when it saves it to Excel its converting to UTC, which is evidently two hours before your current timezone. So the date...
Read more >DatePickerSingle | Dash for Python Documentation | Plotly
After the user chooses a new date, there will be no time part—only the date. If you already have a datetime.datetime object, you...
Read more >How to use date time picker in PowerApps - SPGuides
In this tutorial, we will check PowerApps date time picker. ... So to convert the Date Time Zone in PowerApps, the Date Picker...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! 😃 We can close the issue
You will need to move to the next 1.3.0-alpha02 when it will be released (better not depending on generic snapshot version). In the meantime you can use a “pinned” snapshot like this one:
1.3.0-dev-20200619
Nice. Going ahead and closing this