added logging, fixed daylight savings time bug