Motorola devices : org.threeten.bp.DateTimeException when parsing a date in ThreeTen

后端 未结 6 1813
猫巷女王i
猫巷女王i 2021-02-11 12:23

I have a very weird behaviour on some Motorola devices where LocalDateTime.now() is returning 0000-00-00T00:00:00.0 with ThreeTenABP.

The code

6条回答
  •  猫巷女王i
    2021-02-11 12:49

    You can use this format to parse the date txtldate.setText(Utility.convertMilliSecondsToFormatedDate(leedsModel.getCreatedDateTimeLong(), GLOBAL_DATE_FORMATE));

    txtldate is a edittext or it may be textview and GLOBAL_DATE_FORMATE is a constant with value "dd MMM yyyy"

提交回复
热议问题