So, I have 2 devices in 2 locations. This is how I'm parsing the time I get from a custom message object:
long mtime = message.getEpochTime();
Date messageTime = new Date( mtime * 1000 );
String dateString = messageTime.toString();
String datePrint = dateString.substring(0, dateString.length()-12);
timeTextView.setText(datePrint);
The dates and times are correct in both locations (adjusted to local time zone). However, the formats are different:
In one phone the format is Thu Jun 22 22:31
and the other shows the time as Fri Jun 23 08:31:52 GM
Why is this happening? The length of the datestring should be the same in both locations.