mirror of
https://github.com/zhigang1992/probot.github.io.git
synced 2026-04-29 04:35:27 +08:00
Set timezone for cal entry
This commit is contained in:
@@ -6,16 +6,16 @@ var debug = false;
|
||||
// Adjust to Friday at 17:00 UTC / 1pm Eastern
|
||||
var attrs = {day: "Friday", hour: 17, minute: 0, second: 0, millisecond: 0}
|
||||
|
||||
var start = moment().utc().set(attrs).local()
|
||||
var start = moment().utc().set(attrs)
|
||||
|
||||
// If it's already passed today, go to next Friday
|
||||
if(start < moment()) {
|
||||
start.add({days: 7})
|
||||
}
|
||||
|
||||
end = moment(start).add({hour: 1})
|
||||
var end = moment(start).add({hour: 1})
|
||||
|
||||
if(debug || start < moment().add(4, 'hours')) {
|
||||
if(debug || start < moment().utc().add(4, 'hours')) {
|
||||
document.body.classList.add('office-hours-soon')
|
||||
document.querySelectorAll('.office-hours-nag').forEach(function(el) {
|
||||
el.classList.remove('d-none')
|
||||
|
||||
Reference in New Issue
Block a user