Forum: Ruby on Rails how do I get a Time for today at a specific hour?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bf4d36351bb61a46ff5ce24337816183?d=identicon&s=25 Rich Sturim (sherpa99)
on 2008-10-06 21:31
I'm using Time Zones -- and would like to get a time for today at 3 am?

Is there something available like this?

Time.zone.now.parse('03:00:00')
Bf4d36351bb61a46ff5ce24337816183?d=identicon&s=25 Rich Sturim (sherpa99)
on 2008-10-06 21:36
ok -- i think i've got it ...


Time.zone.now + 3.hours




Rich Sturim wrote:
> I'm using Time Zones -- and would like to get a time for today at 3 am?
>
> Is there something available like this?
>
> Time.zone.now.parse('03:00:00')
Bf4d36351bb61a46ff5ce24337816183?d=identicon&s=25 Rich Sturim (sherpa99)
on 2008-10-06 21:38
opps -- my bad ...

Time.zone.today + 3.hours
This topic is locked and can not be replied to.