TheProfitTable / loanportr

Loan portfolio analysis with R
5 stars 5 forks source link

Figure out why this warning is shown #23

Closed NaasvanH closed 6 years ago

NaasvanH commented 6 years ago

Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'zone/tz/2017c.1.0/zoneinfo/Africa/Johannesburg'

DandeVilliers commented 6 years ago

Yes this is the timezone warning I was talking about the other day 🤔

floresfdev commented 6 years ago

Hi. Are you using macOS High Sierra? I've just stumbled upon some reports of the issue and a workaround: https://stackoverflow.com/questions/47314121/r-error-unknown-timezone-with-as-posixct/47467017#47467017

Sys.setenv(TZ = "Africa/Johannesburg") should solve it for the moment.

NaasvanH commented 6 years ago

Yes, we are both using macOS High Sierra.
Tried it on my side and it works.
Thanks @floresfdev !

floresfdev commented 6 years ago

R 3.4.3 should take care of it: https://stat.ethz.ch/pipermail/r-announce/2017/000623.html

A workaround has been added for the changes in location of -zone files in macOS 10.13 'High Sierra' and again in 10.13.1, so the default time zone is deduced correctly from the system setting when R is configured with --with-internal-tzcode (the default on macOS).

DandeVilliers commented 6 years ago

Yeah, seems to be fixed with R 3.4.3. Thanks @floresfdev