forked from I2P_Developers/i2p.i2p
Console: Add dates to news headings
Spacing for news headings in summary bar
This commit is contained in:
@ -10,6 +10,7 @@ import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@ -18,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import net.i2p.crypto.SU3File;
|
||||
import net.i2p.crypto.TrustedUpdate;
|
||||
@ -553,11 +555,19 @@ class NewsFetcher extends UpdateRunner {
|
||||
out.write("-->\n");
|
||||
if (entries == null)
|
||||
return;
|
||||
DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT);
|
||||
// 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));
|
||||
for (NewsEntry e : entries) {
|
||||
if (e.title == null || e.content == null)
|
||||
continue;
|
||||
out.write("<!-- Entry Date: " + (new Date(e.updated)) + " -->\n");
|
||||
Date date = new Date(e.updated);
|
||||
out.write("<!-- Entry Date: " + date + " -->\n");
|
||||
out.write("<h3>");
|
||||
out.write(fmt.format(date));
|
||||
out.write(": ");
|
||||
out.write(e.title);
|
||||
out.write("</h3>\n");
|
||||
out.write(e.content);
|
||||
|
@ -1,3 +1,6 @@
|
||||
2015-07-16 zzz
|
||||
* Console: Add dates to news headings
|
||||
|
||||
2015-07-12 zzz
|
||||
* Findbugs all over
|
||||
|
||||
|
@ -251,6 +251,7 @@ div.newsheadings {
|
||||
div.newsheadings li {
|
||||
list-style: none outside url('images/newsbullet_mini.png');
|
||||
margin: 0 -4px 2px 8px;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
div.tunnels {
|
||||
|
@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 16;
|
||||
public final static long BUILD = 17;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
Reference in New Issue
Block a user