now using datetime instead of timeofday for charts to fix the midnight issue.