summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2014-10-11 23:31:57 (GMT)
committerDavid A. Madore <david+git@madore.org>2014-10-11 23:31:57 (GMT)
commit4bd86b514131c6df0bf46443f024f2277d43f08c (patch)
treea9942f9a8ad7cdd31164ddd070869dfbe14016c8
parent3ed00b3a8948ae9db8b0f4c711e74ef8fa06565d (diff)
downloaddamlengine-4bd86b514131c6df0bf46443f024f2277d43f08c.zip
damlengine-4bd86b514131c6df0bf46443f024f2277d43f08c.tar.gz
damlengine-4bd86b514131c6df0bf46443f024f2277d43f08c.tar.bz2
Round lastModifiedTime to last second when returning it for HTTP, but not internally.
-rw-r--r--org/madore/damlengine/WeblogServlet.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org/madore/damlengine/WeblogServlet.java b/org/madore/damlengine/WeblogServlet.java
index 8629d7e..d9b0958 100644
--- a/org/madore/damlengine/WeblogServlet.java
+++ b/org/madore/damlengine/WeblogServlet.java
@@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse;
public class WeblogServlet extends HttpServlet {
- private static final long serialVersionUID = 2014101005L;
+ private static final long serialVersionUID = 2014101101L;
@Override
public void init(ServletConfig cfg)
@@ -101,8 +101,6 @@ public class WeblogServlet extends HttpServlet {
}
if ( thisLastModified > lastModified )
lastModified = thisLastModified;
- // O'Reilly recommends not using milliseconds part:
- lastModified = (lastModified/1000)*1000;
return new SingleBlogEntryPath(number, lastModified);
} else
return new NoSuchPath();
@@ -217,7 +215,7 @@ public class WeblogServlet extends HttpServlet {
}
if ( rp instanceof SingleBlogEntryPath ) {
final long lastModified = ((SingleBlogEntryPath)rp).lastModified;
- return lastModified;
+ return (lastModified/1000)*1000;
}
return -1;
}