badnaam wrote: > The time gets stored just fine (though in 24 hour format, which is > another headache)
Time is effectively meaningless without the date part. You say you want to validate times like 7 pm to 9 pm. Does that mean 7-9 pm standard time or daylight time? Without the date you can't know. The time can be stored in UTC, but in order to display the time in a format your users will understand (local time) you again must know the date. > My use case is that on May 1st, customer makes reservation beween > 7-9pm for May 5th. The record is stored with timestamps of 5/1/2010: > 7-9 pm. > > When he shows up on May5th, I need to validate Time.now.. whether it's > between 7 - 9. > On May 17, 12:17�am, Frederick Cheung <[email protected]> Even in your example you are specifying the date with the time. So if your customer makes a reservation between 7-9pm on May 5th, store a datetime range where start_time = May 5, 2010 7:00 PM EDT and end_time = May 5, 2010 9:00 PM EDT. -- Posted via http://www.ruby-forum.com/. -- 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.

