You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2015/11/30 08:59:42 UTC

tapestry-5 git commit: use three digits for the milliseconds to avoid some misunderstandings between SimpleDateFormat and Moment.js

Repository: tapestry-5
Updated Branches:
  refs/heads/master 6559d8c91 -> fb5d6fd49


use three digits for the milliseconds to avoid some misunderstandings between SimpleDateFormat and Moment.js


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/fb5d6fd4
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/fb5d6fd4
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/fb5d6fd4

Branch: refs/heads/master
Commit: fb5d6fd4958594d597f922a958941efd912ee230
Parents: 6559d8c
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Mon Nov 30 08:54:51 2015 +0100
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Mon Nov 30 08:54:51 2015 +0100

----------------------------------------------------------------------
 .../coffeescript/META-INF/modules/t5/core/time-interval.coffee   | 4 +++-
 .../apache/tapestry5/internal/services/DateUtilitiesImpl.java    | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fb5d6fd4/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/time-interval.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/time-interval.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/time-interval.coffee
index f386760..85b86dc 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/time-interval.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/time-interval.coffee
@@ -21,7 +21,9 @@ define ["./dom", "./moment"],
 
   ATTR = "data-timeinterval"
 
-  toMoment = (s) -> if s then moment s else moment()
+  DEFAULT_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSSZ'
+
+  toMoment = (s) -> if s then (moment s, DEFAULT_FORMAT) else moment()
 
   updateElement = (el) ->
     start = toMoment el.attr "data-timeinterval-start"

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fb5d6fd4/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DateUtilitiesImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DateUtilitiesImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DateUtilitiesImpl.java
index 8eaaff3..1d5cb38 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DateUtilitiesImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DateUtilitiesImpl.java
@@ -28,7 +28,7 @@ public class DateUtilitiesImpl implements DateUtilities
 {
     private static final TimeZone tz = TimeZone.getTimeZone("UTC");
 
-    private DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.S'Z'");
+    private DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
 
     {
         df.setTimeZone(tz);