You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by GitBox <gi...@apache.org> on 2019/09/11 21:36:24 UTC

[GitHub] [jena] kinow commented on a change in pull request #603: JENA-1756: Dependency updates

kinow commented on a change in pull request #603: JENA-1756: Dependency updates
URL: https://github.com/apache/jena/pull/603#discussion_r323470387
 
 

 ##########
 File path: jena-base/src/main/java/org/apache/jena/atlas/lib/DateTimeUtils.java
 ##########
 @@ -18,29 +18,22 @@
 
 package org.apache.jena.atlas.lib;
 
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.Calendar ;
 import java.util.Date ;
 import java.util.GregorianCalendar ;
 
 import org.apache.commons.lang3.time.FastDateFormat ;
 
 public class DateTimeUtils {
-
-    // Include timezone (even xsd:dates have timezones; Calendars have timezones)
-    // NB in SimpleDateFormat != FastDateFormat
-    //  SimpleDateFormat does not format Calendars.
-    //  SimpleDateFormat has "X" for  ISO format tmezones (+00:00)  
-    //    FastDateFormat uses "ZZ" for this.
-    private static final FastDateFormat dateTimeFmt_display = FastDateFormat.getInstance("yyyy/MM/dd HH:mm:ss z") ;
-    private static final FastDateFormat dateFmt_yyyymmdd    = FastDateFormat.getInstance("yyyy-MM-ddZZ") ;
-    // For milliseconds == 0
-    private static final FastDateFormat dateTimeFmt_XSD_ms0     = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ") ;
-    // For milliseconds != 0
-    private static final FastDateFormat dateTimeFmt_XSD_ms      = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSSZZ") ;
-    // For milliseconds == 0
-    private static final FastDateFormat timeFmt_XSD_ms0         = FastDateFormat.getInstance("HH:mm:ssZZ") ;
-    // For milliseconds != 0
-    private static final FastDateFormat timeFmt_XSD_ms          = FastDateFormat.getInstance("HH:mm:ss.SSSZZ") ;
+    // Use xxx to get +00:00 format with DateTimeFormatter
 
 Review comment:
   Oh, didn't know about `xxx` for the time-zone offset. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services