I would like to ask for help with the code for UTC offset for the time display. I have a watch face I'm building and plan to have 2 timezones showing the local time and UTC + 0:00.
Can someone help me better understand the code below ? I've tried to piece it together with the references but not to sure I'm headed in the right direction.
This is the code I'm using for local time and I believe I just need to add the offset.
private function setClockDisplay() {
var clockTime = System.getClockTime();
var timeString = Lang.format("$1$:$2$", [clockTime.hour, clockTime.min.format("%02d")]);
var view = View.findDrawableById("TimeDisplay");
view.setText(timeString);
}
Do I just simply add timeZoneOffset + 0:00 for UTC?