devicehive / devicehive-java-server

DeviceHive Java Server
http://www.devicehive.com
Apache License 2.0
364 stars 137 forks source link

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

Open penggle opened 6 years ago

penggle commented 6 years ago

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

penggle commented 6 years ago

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

penggle commented 6 years ago

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 !!!