aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-01-05 17:49:05 +0700
committerGravatar Ugnich Anton2013-01-05 17:49:05 +0700
commit93b44885f6d306d0cb405c4ee9c436ee3ea4c921 (patch)
tree84f3d9fa98a18c929adc21555e22183a41453196 /src
parentfc53fd7d63c703b2664e5cb0cbd6360e4b3f7bd5 (diff)
PageTemplates.formatJSLocalTime
Diffstat (limited to 'src')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 11d20f32..9e4eff98 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -248,7 +248,7 @@ public class PageTemplates {
Date date = sdfSQL.parse(ts);
return "<script type=\"text/javascript\">"
+ "var d=new Date(" + date.getTime() + ");"
- + "document.write(d.getDate()+'.'+(d.getMonth()+1)+'.'+d.getFullYear()+' '+d.getHours()+':'+d.getMinutes());"
+ + "document.write((d.getDate()<10?'0':'')+d.getDate()+'.'+(d.getMonth()<9?'0':'')+(d.getMonth()+1)+'.'+d.getFullYear()+' '+(d.getHours()<10?'0':'')+d.getHours()+':'+(d.getMinutes()<10?'0':'')+d.getMinutes());"
+ "</script>";
} catch (ParseException e) {
System.err.print(e);