Challange with updating watch face

I am trying to get my watch face up and running it is the next version of Steps on Face that has two time zones, one that is configurable by the user and the other that has the current timezone. I have an issue where the main time updates but the second time zone does not update at the same time when in low power mode. The second time zone will update somewhere between a couple seconds after to the next minute. When running in high power mode, both are in sync.

https://apps.garmin.com/en-US/apps/86056484-2ac7-4fd9-a0bf-8baf2d0858fa

Here is the time code that I am using - it is a hack job :D - I do this more for fun than anything else. If people have suggestions to tighten it up I am all ears. It has grown organically and could use some help.

Any thoughts?

Thanks,

Paul

//Get the GMT offset from the user settings
var STZOffset = App.getApp().getProperty("GMTOffset");
var GMTOffsetSecs = Sys.getClockTime().timeZoneOffset;
var TotalTZOffestSecs = ((DSTOffset + STZOffset) * 60);
var STZOffsetHours = TotalTZOffestSecs/Time.Gregorian.SECONDS_PER_HOUR;
var STZOffsetMinutes= abs((TotalTZOffestSecs%Time.Gregorian.SECONDS_PER_HOUR)/Time.Gregorian.SECONDS_PER_MINUTE);

var clockTime = Sys.getClockTime(); //get time info
localTime = Time.now();
midnightTime = Time.today();
var LocalSecsSinceMidnight = localTime.value() - midnightTime.value();
// + 1 sec is a kludge to get the minutes to flip a the right time
var STZSecsSinceMidnight = LocalSecsSinceMidnight + TotalTZOffestSecs - GMTOffsetSecs + 1;

var LocalHour = LocalSecsSinceMidnight/Time.Gregorian.SECONDS_PER_HOUR;
var LocalMinute = (LocalSecsSinceMidnight%Time.Gregorian.SECONDS_PER_HOUR)/Time.Gregorian.SECONDS_PER_MINUTE;
var LocalSeconds = LocalSecsSinceMidnight - (LocalHour * Time.Gregorian.SECONDS_PER_HOUR)
- (LocalMinute * Time.Gregorian.SECONDS_PER_MINUTE);

var STZHour = STZSecsSinceMidnight/Time.Gregorian.SECONDS_PER_HOUR;
var STZMinute = (STZSecsSinceMidnight%Time.Gregorian.SECONDS_PER_HOUR)/Time.Gregorian.SECONDS_PER_MINUTE;

if (STZHour < 0) {
STZHour = 24 + STZHour;
}
if (STZHour >= 24) {
STZHour = STZHour - 24;
}

if (!settings.is24Hour) {
ampm = (STZHour > 11) ? "PM" : "AM";
STZHour = STZHour % 12;
STZHour = (STZHour == 0) ? 12 : STZHour;
}
else
{
ampm = "";
}

Sys.println(ampm);

var STZtimeString = Lang.format("$1$:$2$ $3$", [
STZHour.format("%02d"),
STZMinute.format("%02d"),
ampm
]);


if (STZOffset != -1 && ((STZSecsSinceMidnight-LocalSecsSinceMidnight) != 1)) {
var TestView = View.findDrawableById("GMTTime");
TestView.setText(STZtimeString);
var temp = Ui.loadResource(Rez.Strings.STZStringY);
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
var GMTstr = (STZOffsetHours > 0) ? "GMT +" : "GMT -";
var STZString = Lang.format("$1$$2$:$3$", [
GMTstr,
abs(STZOffsetHours).format("%01d"),
STZOffsetMinutes.format("%02d")
]);
dc.drawText( cx , temp.toNumber(), Gfx.FONT_XTINY, STZString , Gfx.TEXT_JUSTIFY_CENTER);
}


// Write the time and date

if (!settings.is24Hour) {
if (LocalHour > 12) {
LocalHour = LocalHour - 12;
}
if (LocalHour == 0) {
LocalHour = 12; //make it 12 instead of 0 hours
}
}

var hourString = LocalHour.toString() ;
var minuteString = Lang.format("$1$", [LocalMinute.format("%02d")]);
var secString = Lang.format("$1$", [LocalSeconds.format("%02d")]);
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
var minuteWidth = dc.getTextWidthInPixels(minuteString, Timefont);
var hourWidth = dc.getTextWidthInPixels(hourString, boldTimefont);

//load the X & Y from resources.xml
var temp = Ui.loadResource(Rez.Strings.HourTimeY);
var HourTimeY = temp.toNumber();
temp = Ui.loadResource(Rez.Strings.MinTimeY);
var MinTimeY = temp.toNumber();
temp = Ui.loadResource(Rez.Strings.SecTimeY);
var SecTimeY = temp.toNumber();

// center the whole time w/seconds (32 pix)
var timeXPos = (width - (hourWidth + minuteWidth + 32 ))/2 + 10 ;
dc.drawText( timeXPos , HourTimeY, boldTimefont, hourString , Gfx.TEXT_JUSTIFY_LEFT);
dc.drawText( timeXPos + hourWidth + 3 , MinTimeY, Timefont, minuteString , Gfx.TEXT_JUSTIFY_LEFT);
var secXPos = timeXPos + minuteWidth + hourWidth +5;

if (isHighPower) {
dc.setColor(Gfx.COLOR_GREEN, Gfx.COLOR_TRANSPARENT);
} else {
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_BLACK);
}
dc.drawText( secXPos , SecTimeY, secondsfont, secString , Gfx.TEXT_JUSTIFY_LEFT);