Class: RightAws::ActiveSdb::DateTimeSerialization

Inherits:
Object
  • Object
show all
Defined in:
lib/sdb/active_sdb.rb

Class Method Summary collapse

Class Method Details

.deserialize(string) ⇒ Object



1091
1092
1093
# File 'lib/sdb/active_sdb.rb', line 1091

def deserialize(string)
  r = DateTime.parse(string) rescue nil
end

.serialize(date) ⇒ Object



1087
1088
1089
# File 'lib/sdb/active_sdb.rb', line 1087

def serialize(date)
  date.strftime('%Y-%m-%dT%H:%M:%S%z')
end