use rfc time format instead of local

This commit is contained in:
akaessens 2020-08-28 17:52:36 +02:00
parent 4e319d3807
commit 023b7f951a
1 changed files with 3 additions and 3 deletions

View File

@ -45,15 +45,15 @@ public class FbEvent {
} }
/** /**
* Returns a String representation of a ZonedDateTime * Returns a RFC formatted String representation of a ZonedDateTime
* *
* @param zoned_date_time * @param zoned_date_time
* @return Locally formatted String of zoned_date_time or empty String * @return RFC-1123 formatted String of zoned_date_time or empty String
*/ */
static String dateTimeToString(ZonedDateTime zoned_date_time) { static String dateTimeToString(ZonedDateTime zoned_date_time) {
try { try {
return DateTimeFormatter return DateTimeFormatter
.ofLocalizedDateTime(FormatStyle.LONG) .RFC_1123_DATE_TIME
.format(zoned_date_time); .format(zoned_date_time);
} catch (Exception e) { } catch (Exception e) {
return ""; return "";