devicehive-java-server icon indicating copy to clipboard operation
devicehive-java-server copied to clipboard

how can i change the timezone of devicehive-java-server deployed by docker?

Open penggle opened this issue 6 years ago • 2 comments

how can i change the timezone of devicehive-java-server deployed by docker?

penggle avatar Jul 10 '18 01:07 penggle

by the way,I deployed the devicehive-java-server by docker,I'm sure the host and container timezone is correct!

penggle avatar Jul 10 '18 01:07 penggle

i found your com.devicehive.service.time.LocalTimestampService in devicehive-common-service has a problem in method : public String getDateAsString() { DATE_FORMAT.setTimeZone(new SimpleTimeZone(SimpleTimeZone.UTC_TIME, "UTC")); // (1) return DATE_FORMAT.format(getDate()); }

so, this code (1) changes and hard coded the timezone of global const DATA_FORMAT !!!

penggle avatar Jul 10 '18 01:07 penggle