Skip to content

Commit f9588e5

Browse files
committed
commit update #1895
1 parent 40876f5 commit f9588e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

grails-app/assets/javascripts/utils.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ function convertToSimpleDate(isoDate, includeTime, showInUserTimeZone) {
9191
}
9292

9393
var date;
94-
if (showInUserTimeZone === false) {
95-
// keep the date in UTC
96-
date = moment.utc(isoDate);
97-
}
98-
else {
94+
if (showInUserTimeZone === true) {
9995
// default to user's local timezone
10096
date = moment(isoDate);
10197
}
98+
else {
99+
// use existing behaviour
100+
date = moment.tz(isoDate, "Australia/Sydney");
101+
}
102102

103103
var format = includeTime ? "DD-MM-YYYY HH:mm" : "DD-MM-YYYY";
104104
return date.format(format);

0 commit comments

Comments
 (0)