Class: RightAws::ActiveSdb::DateTimeSerialization

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

Class Method Summary (collapse)

Class Method Details

+ (Object) deserialize(string)



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

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

+ (Object) serialize(date)



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

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