Subversion Repositories SmartDukaan

Rev

Rev 26185 | Rev 26187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26185 Rev 26186
Line 59... Line 59...
59
	}
59
	}
60
	
60
	
61
	@Override
61
	@Override
62
    public void addFormatters(FormatterRegistry registry) {
62
    public void addFormatters(FormatterRegistry registry) {
63
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
63
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
-
 
64
        DateTimeFormatter df = new DateTimeFormatterBuilder()
-
 
65
                .parseCaseInsensitive()
-
 
66
                .append(DateTimeFormatter.ISO_LOCAL_DATE)
-
 
67
                .optionalStart()
-
 
68
                .optionalStart()
-
 
69
                .appendLiteral('T')
-
 
70
                .optionalEnd()
-
 
71
                .optionalStart()
-
 
72
                .appendLiteral(' ')
-
 
73
                .optionalEnd()
-
 
74
                .optionalEnd()
-
 
75
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
-
 
76
                .toFormatter();
64
        registrar.setUseIsoFormat(true);
77
        registrar.setDateFormatter(df);
65
        registrar.registerFormatters(registry);
78
        registrar.registerFormatters(registry);
66
    }
79
    }
67
 
80
 
68
	
81
	
69
	
82
	
Line 88... Line 101...
88
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
101
                .append(DateTimeFormatter.ISO_LOCAL_TIME)
89
                .toFormatter();
102
                .toFormatter();
90
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
103
		DateTimeFormatter sf = new DateTimeFormatterBuilder()
91
				.parseCaseInsensitive()
104
				.parseCaseInsensitive()
92
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
105
				.append(DateTimeFormatter.ISO_LOCAL_DATE)
93
				.optionalStart()
-
 
94
				.optionalStart()
-
 
95
				.appendLiteral('T')
106
				.appendLiteral('T')
96
				.optionalEnd()
-
 
97
				.optionalStart()
-
 
98
				.appendLiteral(' ')
-
 
99
				.optionalEnd()
-
 
100
				.optionalEnd()
-
 
101
				.append(DateTimeFormatter.ISO_LOCAL_TIME)
107
				.append(DateTimeFormatter.ISO_LOCAL_TIME)
102
				.toFormatter();
108
				.toFormatter();
103
		LocalDateTimeSerializer serializer = new LocalDateTimeSerializer(sf);
109
		LocalDateTimeSerializer serializer = new LocalDateTimeSerializer(sf);
104
		LocalDateTimeDeserializer deserializer = new LocalDateTimeDeserializer(df);
110
		LocalDateTimeDeserializer deserializer = new LocalDateTimeDeserializer(df);
105
		JavaTimeModule jtm = new JavaTimeModule();
111
		JavaTimeModule jtm = new JavaTimeModule();