In ruby, how can I get current time in a given timezone? I know the offset from UTC, and want to get the current time in the timezone with that offset.
gem install tzinfo
Then
require 'tzinfo' tz = TZInfo::Timezone.get('US/Pacific') Time.now.getlocal(tz.current_period.offset.utc_total_offset)