mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
default timezone
This commit is contained in:
parent
6b128ec798
commit
1675700073
@ -71,12 +71,11 @@ var pages = function(dbot) {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, function() {
|
}, function() {
|
||||||
|
var timezone = req.user.timezone || 'Europe/London';
|
||||||
notifications = _.sortBy(notifications, 'time').reverse();
|
notifications = _.sortBy(notifications, 'time').reverse();
|
||||||
if(req.user.timezone) {
|
|
||||||
_.each(notifications, function(v, k) {
|
_.each(notifications, function(v, k) {
|
||||||
v.time = moment(v.time).tz(req.user.timezone);
|
v.time = moment(v.time).tz(timezone);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
res.render('notifies', {
|
res.render('notifies', {
|
||||||
'server': req.user.server,
|
'server': req.user.server,
|
||||||
@ -92,12 +91,11 @@ var pages = function(dbot) {
|
|||||||
user = req.user,
|
user = req.user,
|
||||||
notifies = this.pending[user.id];
|
notifies = this.pending[user.id];
|
||||||
|
|
||||||
|
var timezone = req.user.timezone || 'Europe/London';
|
||||||
notifies = _.sortBy(notifies, 'time').reverse();
|
notifies = _.sortBy(notifies, 'time').reverse();
|
||||||
if(req.user.timezone) {
|
|
||||||
_.each(notifies, function(v, k) {
|
_.each(notifies, function(v, k) {
|
||||||
v.time = moment(v.time).tz(req.user.timezone);
|
v.time = moment(v.time).tz(timezone);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
res.render('missing_notifies', {
|
res.render('missing_notifies', {
|
||||||
'user': user.primaryNick,
|
'user': user.primaryNick,
|
||||||
@ -136,12 +134,11 @@ var pages = function(dbot) {
|
|||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}, function() {
|
}, function() {
|
||||||
|
var timezone = req.user.timezone || 'Europe/London';
|
||||||
notifies = _.sortBy(notifies, 'time').reverse();
|
notifies = _.sortBy(notifies, 'time').reverse();
|
||||||
if(req.user.timezone) {
|
|
||||||
_.each(notifies, function(v, k) {
|
_.each(notifies, function(v, k) {
|
||||||
v.time = moment(v.time).tz(req.user.timezone);
|
v.time = moment(v.time).tz(timezone);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
res.render('notifies', {
|
res.render('notifies', {
|
||||||
'server': server,
|
'server': server,
|
||||||
@ -159,12 +156,11 @@ var pages = function(dbot) {
|
|||||||
notify.user = user.primaryNick;
|
notify.user = user.primaryNick;
|
||||||
notifies.push(notify);
|
notifies.push(notify);
|
||||||
}, function() {
|
}, function() {
|
||||||
|
var timezone = req.user.timezone || 'Europe/London';
|
||||||
notifies = _.sortBy(notifies, 'time').reverse();
|
notifies = _.sortBy(notifies, 'time').reverse();
|
||||||
if(req.user.timezone) {
|
|
||||||
_.each(notifies, function(v, k) {
|
_.each(notifies, function(v, k) {
|
||||||
v.time = moment(v.time).tz(req.user.timezone);
|
v.time = moment(v.time).tz(timezone);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
res.render('notifies', {
|
res.render('notifies', {
|
||||||
'server': server,
|
'server': server,
|
||||||
|
Loading…
Reference in New Issue
Block a user