lib/eventbrite/api_objects/event.rb
# Returns timezone, reformatting to GMT offset if necessary.
Returns timezone, reformatting to GMT offset if necessary.
Returns timezone reformatting to GMT offset if necessary .
def timezone
      return attribute_get(:timezone) if attribute_get(:timezone) =~ /GMT[+-]\d{1,2}/
      time = TZInfo::Timezone.get(attribute_get(:timezone)).current_period
      seconds = time.utc_offset
      offset = (seconds / (60*60))
      attribute_set(:timezone, (offset < 0 ? "GMT#{offset}" : "GMT+#{offset}"))
      attribute_get(:timezone)
    end
def timezone return attribute_get ( :timezone ) if attribute_get ( :timezone ) =~ / GMT[+-] \d {1,2} / time = TZInfo :: Timezone . get ( attribute_get ( :timezone ) ) . current_period seconds = time . utc_offset offset = ( seconds / ( 60 * 60 ) ) attribute_set ( :timezone , ( offset < 0 ? "GMT#{offset}" : "GMT+#{offset}" ) ) attribute_get ( :timezone ) end
Returns timezone, reformatting to GMT offset if necessary.
Returns timezone reformatting to GMT offset if necessary .