forked from I2P_Developers/i2p.i2p
Centralize time zone code in DataHelper
NewsManager should be a ClientApp, not a RouterApp
This commit is contained in:
@@ -12,7 +12,6 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.i2p.data.DataHelper;
|
||||
@@ -189,9 +188,7 @@ public class EventLogHelper extends FormHandler {
|
||||
|
||||
SimpleDateFormat fmt = (SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
|
||||
// the router sets the JVM time zone to UTC but saves the original here so we can get it
|
||||
String systemTimeZone = _context.getProperty("i2p.systemTimeZone");
|
||||
if (systemTimeZone != null)
|
||||
fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone));
|
||||
fmt.setTimeZone(DataHelper.getSystemTimeZone(_context));
|
||||
|
||||
List<Map.Entry<Long, String>> entries = new ArrayList<Map.Entry<Long, String>>(events.entrySet());
|
||||
Collections.reverse(entries);
|
||||
|
||||
Reference in New Issue
Block a user