fix time-setting and new date object creation