Sha256: 9559cff4bc04248b4f3c7b7863c637d97259e013b40cc53def1470001276e271
Contents?: true
Size: 492 Bytes
Versions: 32
Compression:
Stored size: 492 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Time #:nodoc: module Conversions #:nodoc: 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 def get(value) return nil if value.blank? ::Time.zone ? value.getlocal : value end end end end end
Version data entries
32 entries across 32 versions & 2 rubygems