Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/rcap/extensions/time.rb
Instance Method Summary collapse
-
#to_s_for_cap ⇒ String
Returns a string representaion of the time suitable for CAP.
Instance Method Details
#to_s_for_cap ⇒ String
Returns a string representaion of the time suitable for CAP.
6 7 8 9 |
# File 'lib/rcap/extensions/time.rb', line 6 def to_s_for_cap t = strftime(RCAP::RCAP_TIME_FORMAT) + format(RCAP::RCAP_ZONE_FORMAT, utc_hours_offset) t.sub(/\+(00:\d\d)$/, '-\1') end |