fix negative timeshift

This commit is contained in:
Milos Kozak 2017-10-07 20:42:56 +02:00
parent 60086dac8d
commit 6618d2fef2

View file

@ -199,7 +199,7 @@ public class Profile {
Integer getShitfTimeSecs(Integer originalTime) {
Integer shiftedTime = originalTime + timeshift * 60 * 60;
shiftedTime = shiftedTime % (24 * 60 * 60);
shiftedTime = (shiftedTime + 24 * 60 * 60) % (24 * 60 * 60);
if (timeshift != 0)
log.debug("(Sec) Original time: " + originalTime + " ShiftedTime: " + shiftedTime);
return shiftedTime;