lib/code/object/time.rb in code-ruby-0.8.4 vs lib/code/object/time.rb in code-ruby-0.8.5

- old
+ new

@@ -6,10 +6,13 @@ DEFAULT_ZONE = "Etc/UTC" attr_reader :raw def initialize(time) - @raw = time + ::Time.zone ||= DEFAULT_ZONE + time = time.raw if time.is_a?(Time) + time = time.to_s if time.is_a?(::Time) + @raw = ::Time.zone.parse(time) end def self.name "Time" end