microsoft / spring-data-cosmosdb

Access data with Azure Cosmos DB
MIT License
93 stars 68 forks source link

Wrong Date Pattern Used #440

Closed thiner closed 4 years ago

thiner commented 4 years ago

Version: 2.1.7

I found that you're using pattern yyyy-MM-dd'T'HH:mm:s:SSSXXX in class Constants. This is not a standard date format pattern for ISO-8601. Could it be a mistake? The standard one should be yyyy-MM-dd'T'HH:mm:ss.SSSXXX, please pay attention to the period sign after "ss". Since you're using non-standard pattern, I tried to correct it in my project by add a new deserializer in the customized objectMapper bean. But it is getting overridden by yourZonedDateTimeDeserializer in method provideAdvancedSerializersModule. This is really annoying and it stops me to continue my work. Could you please fix it as soon as possible?

kushagraThapar commented 4 years ago

@thiner The issue for custom object mapper has been fixed in master branch, and will be released as part of 2.1.8. We plan to release it sometime next week. I will update this once it gets released.

thiner commented 4 years ago

@thiner The issue for custom object mapper has been fixed in master branch, and will be released as part of 2.1.8. We plan to release it sometime next week. I will update this once it gets released.

Great! 👍

kushagraThapar commented 4 years ago

Moreover, if you want to test it, you can test against 2.2.0-SNAPSHOT version.

thiner commented 4 years ago

I found that the date formatter pattern is still "non-standard" value. public static final String ISO_8601_COMPATIBLE_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm:s:SSSXXX"; I think the standard value should be yyyy-MM-dd'T'HH:mm:ss.SSSXXX.

kushagraThapar commented 4 years ago

Yes, makes sense. I will update it. Thanks.

kushagraThapar commented 4 years ago

This has been released as part of v2.1.8, closing this issue.