Fix up some DateTime support

Has script functionality too.