KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
To get today's date I do: Date.today # => Fri, 20 May 2011 I would like to get today's date in a specific timezone, say 'Melbourne' . I have the following setting in my application.rb : config.time_zone = 'Melbourne' and I set: Time.zone = 'Melbourne' in my application controller before each action. However, it doesn't help (I guess because these settings affects only dates that are stored in the database). How could I get today's date in 'Melbourne' ?
Tags (comma-separated)
Save Edits
Cancel