Artifact fd21b135e8f3fc8c89a3ec4ad9d5a2f01eb86119:
- File th1ish/cgi/widgets/server-time2.fossi1ish — part of check-in [3cba9ce6ff] at 2014-05-10 12:15:57 on branch trunk — yet more widgeting and templating... (user: stephan size: 475)
/* 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'