Accounted for local timezone offset in calculations.