Re: DateTime and date/time fields

2008-06-03 Thread Farrel
On Jun 2, 6:59 pm, Jeremy Evans [EMAIL PROTECTED] wrote: The value you get from the database is adapter specific (I think Time is used in most cases). When using models with typecasting, it will always cast to a DateTime and not a Time. I'll accept patches for adapters to use a DateTime

Re: DateTime and date/time fields

2008-06-03 Thread Farrel
I should also add this is on a Postgres databases, Sequel 2.0 stable gem, Ruby 1.8.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to

Re: DateTime and date/time fields

2008-06-03 Thread Farrel
Here's the code for the Organisation class class Organisation Sequel::Model before_validation do if self.new? self.uuid = UUID.random_create.to_s end end before_create do creation_time = Time.now self.created_at = creation_time self.updated_at = creation_time