As discussed in #1117, this allows lubridate to use the timezone database in a conda environment if R is currently being executed in one. The conda environment is detected and located using the CONDA_PREFIX environment variable.
The behavior of lubridate was tested before and after this change. Indeed, the timezone information that is installed by the standard tzdata conda package at ${CONDA_PREFIX}/share/zoneinfo is detected and used.
Please check the logic around the handling of Windows. Because conda environment can exist on Windows (and are actually a very nice way to set up a scientific programming environment there), I reorganized the way tzdir_find works to avoid too much nesting.
As discussed in #1117, this allows lubridate to use the timezone database in a conda environment if R is currently being executed in one. The conda environment is detected and located using the
CONDA_PREFIX
environment variable.The behavior of lubridate was tested before and after this change. Indeed, the timezone information that is installed by the standard
tzdata
conda package at${CONDA_PREFIX}/share/zoneinfo
is detected and used.Please check the logic around the handling of Windows. Because conda environment can exist on Windows (and are actually a very nice way to set up a scientific programming environment there), I reorganized the way
tzdir_find
works to avoid too much nesting.