[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [ernie/master] Don't start bridge stats on 1970-01-02.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu, 15 Apr 2010 15:15:00 +0200
Subject: Don't start bridge stats on 1970-01-02.
Commit: cddff2c3ce8ed753c8a96651a6ba69f1ef6c4383

---
 src/BridgeStatsFileHandler.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/BridgeStatsFileHandler.java b/src/BridgeStatsFileHandler.java
index 577a3cb..d86f88c 100644
--- a/src/BridgeStatsFileHandler.java
+++ b/src/BridgeStatsFileHandler.java
@@ -334,6 +334,9 @@ public class BridgeStatsFileHandler {
         for (Map.Entry<String, double[]> e : bridgeUsersPerDay.entrySet()) {
           String date = e.getKey();
           long currentDateMillis = dateFormat.parse(date).getTime();
+          if (lastDateMillis == 0L) {
+            lastDateMillis = currentDateMillis;
+          }
           while (currentDateMillis - 24L * 60L * 60L * 1000L
               > lastDateMillis) {
             lastDateMillis += 24L * 60L * 60L * 1000L;
-- 
1.6.5