Test date serialization