tidyverse / lubridate

Make working with dates in R just that little bit easier
https://lubridate.tidyverse.org
GNU General Public License v3.0
724 stars 207 forks source link

Search conda path for timezone database #1117

Open drhagen opened 1 year ago

drhagen commented 1 year ago

When installing lubridate into a conda environment, lubridate does not see the timezone data stored at ${CONDA_PREFIX}/share/zoneinfo. I see the typical warning message like this and none of the timezones work:

Warning message in system("timedatectl", intern = TRUE):
“running command 'timedatectl' had status 1”
Warning message:
“Failed to locate timezone database”

I know this is kind of a long shot since Tidyverse is not a conda project, but would it be reasonable to add ${CONDA_PREFIX}/share/zoneinfo to the list of default paths that lubridate searches.

I know I can set TZDIR, but that is kind of impossible when creating a conda environment file for someone else.

vspinu commented 1 year ago

I think this addition would not harm but I am not a frequent user of conda even on Python side. So cannot judge. Is Conda still going strong? I would not want to add support for a infrastructure project that gonna die in a few years anyhow. Especially that it didn't seem to have caught up with R folks so far.

@hadley any opinion on this one?

hadley commented 1 year ago

I have little to add hear, except that anecdotally using condas with R seems to be a great struggle. OTOH this seems like a relatively small amount of work, and it would ease one papercut that faces conda + R users.

drhagen commented 1 year ago

Is Conda still going strong? I would not want to add support for a infrastructure project that gonna die in a few years anyhow.

I would say that conda is more popular than it has ever been. It is an essential component of scientific Python. This has been largely driven by Jupyter, which adds Javascript to the mix of Python and C needed to set up a scientific Python environment. Conda can easily install packages from different programming languages together, so it is great for this.

If you don't want to take my word for it, Conda is tagged in about 0.1% of all Stack Overflow posts and still growing. That is pretty high for something on SO that is not a programming language.

vspinu commented 1 year ago

@drhagen would you mind proposing a PR for this? I presume you could test that it really works on your end.

drhagen commented 1 year ago

Yes, I will make a PR for this.