You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug #558 not fixed.
Morphia version : 1.0.1
System locale : FRENCH.
I got a problem when trying to decode my date "Wed May 06 00:00:00 CEST 2015" : it cannot be decoded using the pattern "EEE MMM dd kk:mm:ss z yyyy" as specified in class "DateConverter" line 45.
The date is encoded using "toString()" method (see class "MapOfValuesConverter" line 55), which according to java.util.Data API documentation uses format "dow mon dd hh:mm:ss zzz yyyy". The day & month name is always written in english.
When decoding using "EEE MMM dd kk:mm:ss z yyyy" pattern in SimpleDateFormatter, the day & month name is written according to system locale (french for me).
To fix this bug, the SimpleDateFormatter declared in DateConverter line 45 should specify which langage to use : replace
new SimpleDateFormat("EEE MMM dd kk:mm:ss z yyyy")
by
new SimpleDateFormat("EEE MMM dd kk:mm:ss z yyyy", Locale.US)
The text was updated successfully, but these errors were encountered:
Bug #558 not fixed.
Morphia version : 1.0.1
System locale : FRENCH.
I got a problem when trying to decode my date "Wed May 06 00:00:00 CEST 2015" : it cannot be decoded using the pattern "EEE MMM dd kk:mm:ss z yyyy" as specified in class "DateConverter" line 45.
The date is encoded using "toString()" method (see class "MapOfValuesConverter" line 55), which according to java.util.Data API documentation uses format "dow mon dd hh:mm:ss zzz yyyy". The day & month name is always written in english.
When decoding using "EEE MMM dd kk:mm:ss z yyyy" pattern in SimpleDateFormatter, the day & month name is written according to system locale (french for me).
To fix this bug, the SimpleDateFormatter declared in DateConverter line 45 should specify which langage to use : replace
new SimpleDateFormat("EEE MMM dd kk:mm:ss z yyyy")
by
new SimpleDateFormat("EEE MMM dd kk:mm:ss z yyyy", Locale.US)
The text was updated successfully, but these errors were encountered: