:nodoc:
11 12 13 14
# File 'lib/humanoid/extensions/time/conversions.rb', line 11 def get(value) return nil if value.blank? ::Time.zone ? value.getlocal : value end
6 7 8 9 10
# File 'lib/humanoid/extensions/time/conversions.rb', line 6 def set(value) return nil if value.blank? time = ::Time.parse(value.is_a?(::Time) ? value.strftime("%Y-%m-%d %H:%M:%S %Z") : value.to_s) time.utc? ? time : time.utc end