mirror of
https://github.com/zhigang1992/probot.github.io.git
synced 2026-01-12 22:49:53 +08:00
Use UTC for event button
This commit is contained in:
@@ -25,10 +25,16 @@ function displayTime(elements, time) {
|
||||
var format = el.dataset.format
|
||||
var value;
|
||||
|
||||
if(format == 'fromNow') {
|
||||
value = time.local().fromNow();
|
||||
if(el.dataset.hasOwnProperty('utc')) {
|
||||
time = time.utc()
|
||||
} else {
|
||||
value = time.local().format(format);
|
||||
time = time.local()
|
||||
}
|
||||
|
||||
if(format == 'fromNow') {
|
||||
value = time.fromNow();
|
||||
} else {
|
||||
value = time.format(format);
|
||||
}
|
||||
|
||||
el.innerHTML = value;
|
||||
|
||||
@@ -47,8 +47,8 @@ redirect_from:
|
||||
{% octicon calendar class:"mr-2" %} Add to Calendar
|
||||
</a>
|
||||
|
||||
<span class="start js-office-hours-start-time" data-format="YYYY-MM-DD HH:mm"></span>
|
||||
<span class="end js-office-hours-end-time" data-format="YYYY-MM-DD HH:mm"></span>
|
||||
<span class="start js-office-hours-start-time" data-format="YYYY-MM-DD HH:mm" data-utc></span>
|
||||
<span class="end js-office-hours-end-time" data-format="YYYY-MM-DD HH:mm" data-utc></span>
|
||||
<span class="timezone">UTC</span>
|
||||
<span class="title">Probot Office Hours</span>
|
||||
<span class="description">Join us every week to give feedback, ask questions, get help, or just chat about ideas.</span>
|
||||
|
||||
Reference in New Issue
Block a user