Rails: get Time object in specific time and time zone

To get a rails Time object in a specific time and time zone, do the following:

Time.zone = "Hawaii" #for example
Time.zone.parse("2015/08/04 5:00 PM") #for example

ABOUT THE AUTHOR

Anthony Leon

Author has no description.

NO COMMENTS

Leave a comment

Your email is never published or shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>