manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1837780 - in /manifoldcf/trunk: ./ framework/crawler-ui/src/main/webapp/ framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/
Date Fri, 10 Aug 2018 08:18:45 GMT
Author: kwright
Date: Fri Aug 10 08:18:45 2018
New Revision: 1837780

URL: http://svn.apache.org/viewvc?rev=1837780&view=rev
Log:
Use default server timezone for report displays, rather than UTC, since that's the way we
did it prior to 2016 and the change was made to solve forbidden APIs issues

Modified:
    manifoldcf/trunk/build.xml
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp
    manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java

Modified: manifoldcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Fri Aug 10 08:18:45 2018
@@ -2926,9 +2926,9 @@ Use Apache Forrest version forrest-0.9-d
         <ant dir="site" target="download-cleanup"/>
     </target>
 
-    <!-- taskdef name="forbiddenapis" classname="de.thetaphi.forbiddenapis.ant.AntTask"
classpath="lib/forbiddenapis-2.2.jar"/ -->
+    <taskdef name="forbiddenapis" classname="de.thetaphi.forbiddenapis.ant.AntTask" classpath="lib/forbiddenapis-2.2.jar"/>
 
-    <!-- target name="forbidden-checks" depends="build">
+    <target name="forbidden-checks" depends="build">
         <forbiddenapis failOnMissingClasses="false" targetVersion="1.7">
             <classpath>
                 <fileset dir="dist/lib">
@@ -2937,7 +2937,10 @@ Use Apache Forrest version forrest-0.9-d
             </classpath>
             <bundledsignatures name="jdk-unsafe"/>
             <bundledsignatures name="jdk-non-portable"/>
-            <fileset dir="dist/lib">
+            <fileset dir="framework/build">
+                <include name="**/*.class"/>
+            </fileset>
+            <!--fileset dir="dist/lib">
                 <include name="**/*.jar"/>
             </fileset>
             <fileset dir="dist/lib-proprietary">
@@ -2951,9 +2954,9 @@ Use Apache Forrest version forrest-0.9-d
             </fileset>
             <fileset dir="dist/connector-lib-proprietary">
                 <include name="**/*.jar"/>
-            </fileset>
+            </fileset -->
         </forbiddenapis>
-    </target -->
+    </target>
 
     <target name="precommit" description="Run basic checks before committing" depends="rat-sources"/>
 

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp Fri Aug 10
08:18:45 2018
@@ -523,7 +523,7 @@ try
                   <select class="schedulepulldown" name='reportstartyear'>
                     <option value="" <%=(startYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.NotSpecified")%>
--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals(""+year))?"selected=\"selected\"":""; 
 %>
@@ -621,7 +621,7 @@ try
                   <select class="schedulepulldown" name='reportendyear'>
                     <option value="" <%=(endYear.length() == 0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxactivityreport.NotSpecified")%>--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (endYear.equals(""+year))?"selected=\"selected\"":"";
 %>

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp Fri Aug 10
08:18:45 2018
@@ -525,7 +525,7 @@ try
                   <select class="schedulepulldown" name='reportstartyear'>
                     <option value="" <%=(startYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.NotSpecified")%>--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals(""+year))?"selected=\"selected\"":""; 
 %>
@@ -624,7 +624,7 @@ try
                   <select class="schedulepulldown" name='reportendyear'>
                     <option value="" <%=(endYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"maxbandwidthreport.NotSpecified")%>--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals(""+year))?"selected=\"selected\"":"";
 %>

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp Fri Aug 10 08:18:45
2018
@@ -553,7 +553,7 @@ try
                   <select class="schedulepulldown" name='reportstartyear'>
                     <option value="" <%=(startYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"resultreport.NotSpecified")%>--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals(""+year))?"selected=\"selected\"":""; 
 %>
@@ -652,7 +652,7 @@ try
                   <select class="schedulepulldown" name='reportendyear'>
                     <option value="" <%=(endYear.length() == 0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"resultreport.NotSpecified")%>--</option>
 <%
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals("" + year))?"selected=\"selected\"":"";
 %>

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp Fri Aug 10 08:18:45
2018
@@ -479,7 +479,7 @@ try
                   <select class="schedulepulldown" name='reportstartyear'>
                     <option value="" <%=(startYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.NotSpecified")%>--</option>
 <% 
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (startYear.equals(""+year))?"selected=\"selected\"":"";
 %>
@@ -578,7 +578,7 @@ try
                   <select class="schedulepulldown" name='reportendyear'>
                     <option value="" <%=(endYear.length()==0)?"selected=\"selected\"":""%>>--
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.NotSpecified")%>--</option>
 <%
-  for(int year=2005; year <= java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
year++)
+  for(int year=2005; year <= java.util.Calendar.getInstance(clientTimezone, pageContext.getRequest().getLocale()).get(java.util.Calendar.YEAR);
year++)
   {
     String selected = (endYear.equals(""+year))?"selected=\"selected\"":"";
 %>

Modified: manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java?rev=1837780&r1=1837779&r2=1837780&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java
(original)
+++ manifoldcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Formatter.java
Fri Aug 10 08:18:45 2018
@@ -32,7 +32,7 @@ public class Formatter
   */
   public static String formatTime(long time)
   {
-    Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ROOT);
+    Calendar c = new GregorianCalendar(TimeZone.getDefault(),/*TimeZone.getTimeZone("UTC"),*/
Locale.ROOT);
     c.setTimeInMillis(time);
     // We want to format this string in a compact way:
     // mm-dd-yyyy hh:mm:ss.mmm



Mime
View raw message