File th1ish/cgi/widgets/server-time2.fossi1ish artifact fd21b135e8 part of check-in a5a9733acd
/* Alternate impl of server-time widget which relies upon the options object passed to api.cgi.renderWidget() being the 'this' value of the import() call which loads this code. */ const CGI = api.cgi CGI.extendProperties(object{ localTime: false, timeFormat: "%Y-%m-%d %H:%M:%S", tzLabel: true }, this ) this.label && $CGI.out this.label ' ' $CGI.out strftime(this.timeFormat, -1, this.localTime) this.tzLabel && $CGI.out this.localTime ? ' local' : ' UTC'