fixed bug in date2doy where midnight was specified under local timezone, not tz=GMT