Handle serializing datetime values