There wont be a specific timezone, people will use it in all timezones
and so I would need it to work for everyone.

This issue started for me when I had this:


  validates_inclusion_of :date_of_birth, :in =>
110.years.ago.to_datetime..60.years.ago.to_datetime, :message
=> :invalid_age, :allow_nil => true


So I trried to add date of birth of 110 years exactly, and it said it
was an invalid age even though I specify above 110 years ago is ok.

Then I try this:


  validates_inclusion_of :date_of_birth, :in =>
(110.years.ago.to_datetime - 1.days)..
60.years.ago.to_datetime, :message => :invalid_age, :allow_nil => true

And thats when it gives me wrong date.

My environment is already set to UTC:

config.time_zone = 'UTC'

thanks for response

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: 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/rubyonrails-talk?hl=en.

Reply via email to