A Pujie Black user has requested assistance with working out the time from an offset.  The maths was used in my 24 hour hands preset…  This was my advice…

var mtag=[m];
var htag=[h24];
var tzl=[t1_label];
var df = (([gmt_offset])[t1_gmt_offset]);
var mo = parseInt(df);
var so = df-mo;
if (so == 0) {
  var h = htag+df;
  var m = mtag;
} else {
  var h = htag+mo;
  var m = mtag+(so*60);
  if (m<0) {
    m=m+60;
    h=h-1;
  }
}
h=h<0?(h+24)%24:h%24;
m=m%60;
return tzl+" "+h+":"+('0'+m).slice(-2)

Leave a Reply

Your email address will not be published. Required fields are marked *