wgtmac commented on code in PR #1882:
URL: https://github.com/apache/orc/pull/1882#discussion_r1558859665


##########
c++/src/Timezone.cc:
##########
@@ -659,7 +659,15 @@ namespace orc {
   const char* getTimezoneDirectory() {
     const char* dir = getenv("TZDIR");
     if (!dir) {
-      dir = DEFAULT_TZDIR;
+      // this is present if we're in an activated conda environment
+      const char* conda_prefix = getenv("CONDA_PREFIX");
+      if (conda_prefix) {
+        std::string conda_dir(conda_prefix);
+        conda_dir += "/share/zoneinfo";
+        dir = conda_dir.c_str();

Review Comment:
   This unfortunately returns a dangling pointer.



##########
c++/src/Timezone.cc:
##########
@@ -659,7 +659,15 @@ namespace orc {
   const char* getTimezoneDirectory() {
     const char* dir = getenv("TZDIR");
     if (!dir) {
-      dir = DEFAULT_TZDIR;
+      // this is present if we're in an activated conda environment
+      const char* conda_prefix = getenv("CONDA_PREFIX");

Review Comment:
   Usually we use variable naming style like `condaPrefix`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to