forked from 0x2620/pandora
in statistics dialog, use local time - fixes #1111
This commit is contained in:
parent
f91821d2e8
commit
9d9501250e
1 changed files with 4 additions and 4 deletions
|
@ -134,11 +134,11 @@ pandora.ui.statisticsDialog = function() {
|
||||||
var city, continent, country, countryData, name = {}, region, split;
|
var city, continent, country, countryData, name = {}, region, split;
|
||||||
if (mode == 'all' || item.level != 'guest') {
|
if (mode == 'all' || item.level != 'guest') {
|
||||||
['firstseen', 'lastseen'].forEach(function(key, i) {
|
['firstseen', 'lastseen'].forEach(function(key, i) {
|
||||||
var year = item[key].slice(0, 4) + '-' + key,
|
var year = Ox.formatDate(item[key], '%Y') + '-' + key,
|
||||||
month = item[key].slice(0, 7) + '-' + key,
|
month = Ox.formatDate(item[key], '%Y-%m') + '-' + key,
|
||||||
day = item[key].slice(0, 10),
|
day = Ox.formatDate(item[key], '%Y-%m-%d'),
|
||||||
weekday = Ox.formatDate(item[key], '%u'),
|
weekday = Ox.formatDate(item[key], '%u'),
|
||||||
hour = item[key].slice(11, 13);
|
hour = Ox.formatDate(item[key], '%H');
|
||||||
data[mode].year[year] = data[mode].year[year] || {};
|
data[mode].year[year] = data[mode].year[year] || {};
|
||||||
data[mode].year[year][month] = (data[mode].year[year][month] || 0) + 1;
|
data[mode].year[year][month] = (data[mode].year[year][month] || 0) + 1;
|
||||||
data[mode].month[month] = (data[mode].month[month] || 0) + 1;
|
data[mode].month[month] = (data[mode].month[month] || 0) + 1;
|
||||||
|
|
Loading…
Reference in a new issue