Skip to content

Commit

Permalink
Add local timezone offset check to Abstract Con
Browse files Browse the repository at this point in the history
The main loop in AbstractConnectorMain now checks for a change in the
local timezone offset and updates the connector's timezone offset if
necessary.
  • Loading branch information
it-hms committed Oct 22, 2024
1 parent 23369c2 commit 0194b79
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.hms_networks.americas.sc.extensions.system.time.SCTimeSpan;
import com.hms_networks.americas.sc.extensions.system.time.SCTimeUnit;
import com.hms_networks.americas.sc.extensions.system.time.SCTimeUtils;
import com.hms_networks.americas.sc.extensions.system.time.TimeZoneManager;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -934,6 +935,14 @@ public void connectorMain(String[] args) {
// Invoke connector main loop
connectorLoopRun();

try {
TimeZoneManager.checkUpdateTimeZone();
} catch (Exception e) {
Logger.LOG_SERIOUS(
"An error occurred while attempting to check and update the local timezone offset.");
Logger.LOG_EXCEPTION(e);
}

// Sleep for specified cycle time
try {
Thread.sleep(connectorCycleTime.getTimeSpanMillis());
Expand Down

0 comments on commit 0194b79

Please sign in to comment.