manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1838016 - /manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
Date Tue, 14 Aug 2018 12:26:22 GMT
Author: kwright
Date: Tue Aug 14 12:26:22 2018
New Revision: 1838016

URL: http://svn.apache.org/viewvc?rev=1838016&view=rev
Log:
Bring job status page into conformity with the rest of the UI and use browser time for display

Modified:
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp?rev=1838016&r1=1838015&r2=1838016&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp Tue Aug 14 12:26:22
2018
@@ -23,6 +23,17 @@
 %>
 
 <%
+final String clientTimezoneString = variableContext.getParameter("client_timezone");
+final TimeZone clientTimezone;
+if (clientTimezoneString == null || clientTimezoneString.length() == 0)
+{
+  clientTimezone = TimeZone.getDefault();
+}
+else
+{
+  clientTimezone = TimeZone.getTimeZone(clientTimezoneString);
+}
+
 try
 {
   // Check if authorized
@@ -187,7 +198,7 @@ try
     }
     String startTime = Messages.getBodyString(pageContext.getRequest().getLocale(),"showjobstatus.Notstarted");
     if (js.getStartTime() != -1L)
-      startTime = new Date(js.getStartTime()).toString();
+      startTime = org.apache.manifoldcf.ui.util.Formatter.formatTime(clientTimezone, pageContext.getRequest().getLocale(),
js.getStartTime());
     String endTime = Messages.getBodyString(pageContext.getRequest().getLocale(),"showjobstatus.Aborted");
     if (js.getStartTime() == -1L)
       endTime = Messages.getBodyString(pageContext.getRequest().getLocale(),"showjobstatus.Neverrun");
@@ -201,7 +212,7 @@ try
           endTime = "";
       }
       else
-        endTime = new Date(js.getEndTime()).toString();
+        endTime = org.apache.manifoldcf.ui.util.Formatter.formatTime(clientTimezone, pageContext.getRequest().getLocale(),
js.getEndTime());
     }
 %>
             <tr job-id="<%= js.getJobID() %>" job-status="<%= status %>" job-status-name="<%=
statusName%>">



Mime
View raw message