Skip to content

set timezone explicitly

Flukx requested to merge flukx/scraper:settzexplicitly into master

Advantage: it is easier to see that Berlin is the standard timezone and it's not hidden in the default value of the constructor of the dependency TrichterDB.

I have searched several times for ours because my Reykjavík version always showed German times. The solution was to set the timezone in the argument of the TrichteDB constructor (see change).

Another solution would be to remove the argument in the TrichterDB, remove the setting of the default timezone and set the timezone here in the Scraper via moment.tz.setDefault(). I would find that more obvious, since setting a global option in a used library confused me. It might also be worth to use the timezone set by the TZ environment variable. That's what javascript does for the built-in Date objects.

Merge request reports