Implement automatic type conversion for midgard_datetime