Methods

Class/Module Index [+]

Quicksearch

Akami::CoreExt::Time

Public Instance Methods

xs_datetime() click to toggle source

Returns an xs:dateTime formatted String.

# File lib/akami/core_ext/time.rb, line 6
def xs_datetime
  zone = if utc_offset < 0
    "-#{"%02d" % (- utc_offset / 3600)}:#{"%02d" % ((- utc_offset % 3600) / 60)}"
  elsif utc_offset > 0
    "+#{"%02d" % (utc_offset / 3600)}:#{"%02d" % ((utc_offset % 3600) / 60)}"
  else
    "Z"
  end

  strftime "%Y-%m-%dT%H:%M:%S#{zone}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.