diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js
index 0e3f39c8..c00065dc 100644
--- a/src/webui/static/app/dvr.js
+++ b/src/webui/static/app/dvr.js
@@ -26,8 +26,8 @@ tvheadend.dvrDetails = function(uuid) {
content += '
' + title + '
';
content += '' + episode + '
';
- content += 'Scheduled Start Time:
' + new Date(start_real * 1000).toLocaleString() + '
';
- content += 'Scheduled Stop Time:
' + new Date(stop_real * 1000).toLocaleString() + '
';
+ content += 'Scheduled Start Time:
' + tvheadend.niceDate(start_real * 1000) + '
';
+ content += 'Scheduled Stop Time:
' + tvheadend.niceDate(stop_real * 1000) + '
';
content += 'Duration:
' + parseInt(duration / 60) + ' min
';
content += '' + desc + '
';
content += '
';
diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js
index 50b184b1..ace3a96f 100644
--- a/src/webui/static/app/epg.js
+++ b/src/webui/static/app/epg.js
@@ -89,6 +89,10 @@ tvheadend.durationLookupRange = function(value) {
tvheadend.epgDetails = function(event) {
var content = '';
+ var duration = 0;
+
+ if (event.start && event.stop && event.stop - event.start > 0)
+ duration = (event.stop - event.start) / 1000;
if (event.channelIcon != null && event.channelIcon.length > 0)
content += '
';
@@ -100,9 +104,11 @@ tvheadend.epgDetails = function(event) {
if (event.episodeOnscreen)
content += '' + event.episodeOnscreen + '
';
if (event.start)
- content += '';
+ content += '';
if (event.stop)
- content += '';
+ content += '';
+ if (duration)
+ content += '';
if (event.summary)
content += '' + event.summary + '
';
if (event.description)
diff --git a/src/webui/static/app/ext.css b/src/webui/static/app/ext.css
index 3b7eaf1f..feb07984 100644
--- a/src/webui/static/app/ext.css
+++ b/src/webui/static/app/ext.css
@@ -510,6 +510,17 @@
width: 100px;
}
+.x-date-date {
+ display: inline-block;
+ width: 6em;
+}
+
+.x-date-time {
+ display: inline-block;
+ width: 4em;
+ text-align: right;
+}
+
.x-epg-title {
margin: 5px;
font: normal 16px arial, tahoma, helvetica, sans-serif;
diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js
index 08834e8e..afa5fb63 100644
--- a/src/webui/static/app/tvheadend.js
+++ b/src/webui/static/app/tvheadend.js
@@ -151,6 +151,15 @@ Ext.Ajax.request({
}
});
+/*
+ *
+ */
+tvheadend.niceDate = function(dt) {
+ var d = new Date(dt);
+ return '' + d.toLocaleDateString() + '
' +
+ '' + d.toLocaleTimeString() + '
';
+}
+
/**
* Displays a mediaplayer using the html5 video element
*/