Its useful to get the current time in the correct time zone instead of UTC.
To do this in Rails.
# Return Current Time in UTC
Time.now
# Return Current Time in your Time Zone
Time.zone.now
Related External Links:
Its useful to get the current time in the correct time zone instead of UTC.
To do this in Rails.
# Return Current Time in UTC
Time.now
# Return Current Time in your Time Zone
Time.zone.now
Related External Links:
Article Topic:Software Development - Rails
Date:June 13, 2015
Want me to help develop your next project or application?
Contact MeSpecializing in Web and App Development with Ruby on Rails