I'm trying to cross off some last minute bugs today and [finally] put out version 4.43.
One of the bugs pointed out that the date string format (used by Android for all Date fields) did not include the timezone. A big miss.
As a fix, I've made the default format to be "yyyy-MM-dd HH:mm:ss.SSS Z" while still supporting the old format "yyyy-MM-dd HH:mm:ss.SSSSSS". It will first try to parse the date with the timezone and if that fails will use the old format. Any new rows or updates will be saved _with_ the timezone.
Comments about this? Is it going to be bad to have rows with different date formats? Is that going to make it harder to do queries or something?
gray
On Nov 12, 2012, at 1:39 PM, Paul Lammertsma wrote:
> bugs:135 Date persister stores without time zone
>
> Status: open Created: Mon Nov 12, 2012 06:39 PM UTC by Paul Lammertsma Last Updated: Mon Nov 12, 2012 06:39 PM UTC Owner: nobody
>
> I'm not sure exactly how this is stored in other databases, but in Sqlite (e.g. on Android), Dates are stored as YYYY-MM-DD HH:MM:SS. This works fine until the device's time zone is changed.
>
> It would be an improvement to include the time zone, or store the date as a UTC timestamp.
>
> Sent from
sourceforge.net because you indicated interest in
https://sourceforge.net/p/ormlite/bugs/135/
>
> To unsubscribe from further messages, please visit
https://sourceforge.net/auth/prefs/
>