Method: PostHog::Utils#seconds_to_utc_offset
- Defined in:
- lib/posthog/utils.rb
#seconds_to_utc_offset(seconds, colon = true) ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/posthog/utils.rb', line 82 def seconds_to_utc_offset(seconds, colon = true) (colon ? UTC_OFFSET_WITH_COLON : UTC_OFFSET_WITHOUT_COLON) % [ (seconds < 0 ? '-' : '+'), (seconds.abs / 3600), ((seconds.abs % 3600) / 60) ] end |