I noticed that java.util.Date
class on android gives a different date format for different devices which is giving me lots of problems when running on different devices. for example Huawei devices date format is Mon Jan 01 00:00:00 GMT+02:00 2018
and where as Samsung format is Mon Jan 01 00:00:00 SAST 2018
. But I don't have other devices to test and get the different formats so I was wondering is there a list of different formats we would get from different devices that I don't have. Or is there another way to format these dates like these
convert java.util.Date
to 19 Apr 2018
convert java.util.Date
to 2018-04-19
convert java.util.Date
to 2018-05-10 08:52:21
convert 2018-05-10 08:52:21
to 08:52 10 May 2018