When creating a MaterialDatePicker using the MaterialDatePicker.todayInUtcMilliseconds() method, our app is returning a timestamp that is a day out from the current date.
The simplified code we are using to display the MaterialDatePicker is as follows:
val picker: MaterialDatePicker<Long> = MaterialDatePicker.Builder.datePicker()
.setInputMode(MaterialDatePicker.INPUT_MODE_CALENDAR)
.setSelection(MaterialDatePicker.todayInUtcMilliseconds())
.setTitleText("Custom title")
.build()
picker.run {
addOnPositiveButtonClickListener(viewModel::updateContractDate)
show(parentActivity.supportFragmentManager, picker.toString())
}
Which, when displayed, is showing yesterdays date as selected (6 July) as seen below:
This is especially odd as the same sample code returns correctly on the same device when used in the Material Component library's sample 'catalog' app.
We are using the latest Material Library version 1.3.0-alpha01 and have observed this on Android 10 - API 29 and Android 8.1 - API 27. We are also utilizing Jake Wharton's ThreeTen Android Backport elsewhere in the app, but I am not sure if that is relevant.
Any help would be greatly appreciated!

