bug fix: ensures the correct timezone is used according to the date passed in