use rfc time format instead of local
This commit is contained in:
parent
4e319d3807
commit
023b7f951a
|
@ -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 "";
|
||||||
|
|
Loading…
Reference in New Issue