On Feb 11, 9:14 am, Simon Arnaud <[email protected]> wrote: > Hi > > Followinghttp://groups.google.com/group/sequel-talk/browse_thread/thread/6138e... > you changed the behavior of literal_date from then. > > I recently updated sequel, and my dates are no longer saved as ISO8601. > > I looked the sequel code, it relies on "literal_date" and > "requires_sql_standard_datetimes?" now. > > I'm wondering how I should change the boolean returned by > "requires_sql_standard_datetimes?" > I overwrite it in my code, but it does not seems very nice. > > Then i have another problem : SQLite does not like "DATE 'YYY-MM-DD'". > > So I'm back with the tweak I used back then, overwrite literal_date. > > I don't have a solution at hand, nor how it should be handled.
Sequel uses IS08601 dates on SQLite: $ sequel sqlite:/ Your database is stored in DB... irb(main):001:0> DB.literal Date.today => "'2010-02-11'" One issue with SQLite is that it doesn't have real date/datetime columns. Other than using a space instead of a T to separate the date and time, Sequel uses ISO8601 for datetimes, and using a space is technically allowed, though it specifies a date and a time instead of a datetime (if Wikipedia is accurate). If you want to use a specific date/datetime format for SQLite, you'll need to override literal_date, literal_time, and/or literal_datetime for the dataset class you are using. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
