summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-12-04 14:40:12 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-12-04 14:40:12 -0500
commit226fb11ff2da90b7b68dad1b29b9688f880a06a3 (patch)
tree86de944318bf3610af01258c455ceacfd450c307 /lib
parent87e2e610a69b268d10a22a7142a44a2c0afd4799 (diff)
timeFormat .urp directive
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 5f1566a3..c6e55907 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -114,11 +114,14 @@ function round(n) {
// Time, represented as counts of microseconds since the epoch
+var time_format = "%c";
+
function showTime(tm) {
- var newDate = new Date();
- newDate.setTime(tm / 1000);
- var r = newDate.toUTCString();
- return r;
+ return strftime(time_format, tm);
+}
+
+function showTimeHtml(tm) {
+ return eh(showTime(tm));
}
function now() {