improved date/time handling