Ah yes, that's useful to know. Thanks Michishige. And thanks for the
link Martin. This should allow me to make a sensible choice about
which format to use.

cheers,

DAZ

On Apr 17, 2:20 pm, Michishige Kaito <chris.webs...@gmail.com> wrote:
> I think they are all stored as native date/time types, depending on
> database support. Either that, or strings that are parsed back to Date
> objects. Have a look at the data_objects code for your database, to
> confirm this behavior. I don't think this will be much of a constraint,
> however, unless you're dealing with billions of records. In smaller apps,
> the main constraint is programming time and comfort, which is why I was
> talking about the Ruby types =)
>
>   On Sat, 16 Apr 2011, DAZ wrote:
>
>
>
>
>
>
>
> > Thanks for the reply Michishige. I understand the differences between
> > the 3 Ruby date types, but wondered what DM did behind the scenes with
> > these ... are there any differences in how they are saved in the
> > underlying DB?
>
> > DAZ
>
> > On Apr 16, 3:49�pm, Michishige Kaito <chris.webs...@gmail.com> wrote:
> >> On Sat, 16 Apr 2011, DAZ wrote:
> >>> Hi,
>
> >>> The docs say the following date types are available:
>
> >>> �DateTime, Date, Time
>
> >>> I have always just used DateTime, but would actually like to work in
> >>> seconds and therefore use a Time object.
>
> >>> Is there any difference in the background in using Time as a type?
>
> >>> e.g.:
>
> >>> �property :created_at, � Time, :default => �proc { |m,p| Time.now}
>
> >>> cheers,
>
> >>> DAZ
>
> >> The differences lie in the Ruby types you'll be working with, as the types
> >> correspond with Ruby date and time classes. I suggest you have a look at
> >> their documentation and judge by yourself.
>
> >> As far as I'm concerned, DateTime has support for timezones and some other
> >> fancy things, while both Date and Time are a little "simpler". Depends on
> >> your needs. I usually just use Date or Time.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "DataMapper" group.
> > To post to this group, send email to datamapper@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > datamapper+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/datamapper?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to