diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-03-24 13:26:07 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-03-28 13:55:28 -0400 |
commit | 879050c98e1d2cc18f522a16d5b0cb2b82232dca (patch) | |
tree | c582ee8dcc04f2dbc62b00b12905874ac5d67fba /lib | |
parent | e3e4ed19ef47bbbd8a0236011b5d4bf131eed048 (diff) | |
download | patchfoo-879050c98e1d2cc18f522a16d5b0cb2b82232dca.tar.gz patchfoo-879050c98e1d2cc18f522a16d5b0cb2b82232dca.zip |
Try to clarify gathering times
- Show user-local date time string on gathering page, alongside UTC
timestamp and TZ string
- Include TZ in about message
- Align table headings to be more readable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 4 | ||||
-rw-r--r-- | lib/serve.js | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index ccaa5b1..68ea4d7 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -608,9 +608,9 @@ RenderMsg.prototype.links = function (links, cb) { function dateTime(d) { var date = new Date(d.epoch) + var tz = d.tz || d.bias return date.toString() - // d.bias - // d.epoch + + (tz ? ' in ' + tz : '') } // TODO: make more DRY diff --git a/lib/serve.js b/lib/serve.js index d780024..2beafc4 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1293,6 +1293,7 @@ Serve.prototype.gathering = function (url) { var sources = about._sources || {} var start = about.startDateTime var img = about.imageLink + var startDate = start && new Date(start.epoch) pull( ph('section', [ ph('h2', ['Gathering ', hashLink(id)]), @@ -1322,11 +1323,12 @@ Serve.prototype.gathering = function (url) { ph('th', 'Start time'), ph('td', sources.startDateTime.map(hashLink)), ph('td', [ - ph('code', u.escapeHTML(new Date(start.epoch).toISOString().replace(/ .*/, ''))), + ph('code', u.escapeHTML(startDate.toISOString().replace(/ .*/, ''))), start.tz ? [ - ' ', + '<br>', ph('code', u.escapeHTML(start.tz)) - ] : '' + ] : '', + ph('div', u.escapeHTML(startDate.toString())) ]) ]) : '', about.description ? ph('tr', [ |