Pakillo/CityShadeMapper

Time zones

Closed this issue · 1 comments

Time zones together with Daylight Savings Times are complicated...

The time difference between local time and UTC/solar time at late March or late October (i.e. after DST) depends on the particular year

We're going to model a 'standard' year, so let's assume that all days from November to March, both included, have winter time (i.e. 1 hour ahead of UTC/solar), and all days between April and October (both included) have summer time (i.e. 2 hours ahead of UTC/solar)

P.S. Here is a base R solution to find time difference at any given date

Finally using lutz package to calculate time zones and time offsets (see https://github.com/Pakillo/CityShadeMap/blob/master/R/get_sun_position.R)

So we just need to choose a standard year (e.g. 2021) and keep in mind that the last days of March and last days of October 1 or 2 hours offset depending on the year (ie some minor error in those days, depending on when exactly DST happens)