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



1076
1077
1078
# File 'lib/sdb/active_sdb.rb', line 1076

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

.serialize(date) ⇒ Object



1072
1073
1074
# File 'lib/sdb/active_sdb.rb', line 1072

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