Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5941819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:09:51+00:00 2026-05-22T16:09:51+00:00

To get today’s date I do: Date.today # => Fri, 20 May 2011 I

  • 0

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' ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:09:51+00:00Added an answer on May 22, 2026 at 4:09 pm

    You should be able to do this: Time.current. That would display the current time in Melbourne if that’s what Time.zone is set to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get today's date in the following format: mmddyyyy . Even
i have the following code def get(self): date = datetime.date.today() loc_query = Location.all() last_cursor
I would like to get today's date in the format of YYYYMMDD in Windows
I have a variable in my Sinatra application: get '/' do @agenda_date = Date.today
I'm able to get today's date using the following in Objective-c: NSDate *date =[NSDate
Let's say we are the 15/07/2010, I would like to get the first day
In my Blackberry application I'd like to get today's date so I can display
I am trying to get the following: [today's date]___[textfilename].txt from the following code: using
The following code class Schedule < ActiveRecord::Base def self.get today = TZInfo::Timezone.get('America/New_York').utc_to_local(Time.now.utc).to_date end end
I am trying to get today's date with some specific format: var d =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.