Thanks Dirkjan, that helps. We're generally storing everything in UTC so hadn't been affected by the missing TZ. But, since we are simply relying on convention, I can see how the missing info could be an issue for some.
On the other hand, SQLite's date and time functions don't accept timezone's in their time strings either, but assume that everything is in UTC, and it seems like most tools/frameworks that work with SQLite follow the convention of storing time in UTC representations of some kind and converting back and forth between the current locale and UTC as appropriate. Either way, a setting to affect the storage format would be helpful for us, as we are using Ruby/DataMapper as part of a system that includes other platforms that need to read the data. And being able to parse back the chosen format to Rubyland would surely be useful too. Best, John On Sep 4, 6:20 am, Dirkjan Bussink <[email protected]> wrote: > On Thu, Sep 3, 2009 at 7:16 PM, johnc<[email protected]> wrote: > > I'm really unfamiliar with the internals of mapping types to DB types > > in DataMapper, but it strikes me that this is the default string > > representation for DateTime/Time and I'm wondering if somewhere in > > do_sqlite3 or datamapper the date is being inserted as a string object > > using its string representation instead of being treated like a date. > > This is indeed the case, because Sqlite3 doesn't support Date / > DateTime / Time at all. Sqlite3 in fact only supports Integer, String > and Float. Therefore it uses a string as the backend storage. We > probably should allow the parsing back of a Date / DateTime / Time to > be more lenient so it accepts multiple formats. The change was made > because the original format didn't store the timezone and therefore > resulted in data loss. > > -- > Regards, > > Dirkjan Bussink --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
