mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Forgot that I still had everything hard-coded to central time. Changed it to be configurable per account.
This commit is contained in:
@@ -26,7 +26,7 @@ public class RebuildSummaries {
|
||||
public static void main(String[] args) {
|
||||
int accountId = 1;
|
||||
CurrentMonitorDao dao = new MongoCurrentMonitorDao(MongoConfig.fromDisk(LanternFiles.OPS_PATH + "mongo.cfg"));
|
||||
TimeZone tz = TimeZone.getTimeZone("America/Chicago");
|
||||
TimeZone tz = dao.getTimeZoneForAccount(accountId);
|
||||
Date start = DateUtils.date(1, 7, 2021, tz);
|
||||
// Date start = DateUtils.getMidnightBeforeNow(tz);
|
||||
Date end = DateUtils.getMidnightAfterNow(tz);
|
||||
@@ -49,7 +49,7 @@ public class RebuildSummaries {
|
||||
if (energy == null)
|
||||
energy = new BreakerGroupEnergy(root, minute, EnergyBlockViewMode.DAY, day.getKey(), tz);
|
||||
else
|
||||
energy.addEnergy(breakers, breakerKeyToGroup, minute, tz);
|
||||
energy.addEnergy(breakers, breakerKeyToGroup, minute);
|
||||
}
|
||||
timer.stop();
|
||||
if (energy != null)
|
||||
|
||||
Reference in New Issue
Block a user