h-vetinari commented on code in PR #1882:
URL: https://github.com/apache/orc/pull/1882#discussion_r1559027034
##########
c++/test/TestTimezone.cc:
##########
@@ -437,4 +437,29 @@ namespace orc {
}
}
+ TEST(TestTimezone, testTzdbFromCondaEnv) {
+ const char* tzDirBackup = std::getenv("TZDIR");
+ // test only makes sense if TZDIR exists
+ if (tzDirBackup != nullptr) {
+ ASSERT_TRUE(delEnv("TZDIR"));
+
+ // remove "/share/zoneinfo" from TZDIR to get (equivalent of)
CONDA_PREFIX
+ std::string condaPrefix(tzDirBackup);
+ condaPrefix += "/../..";
+ ASSERT_TRUE(setEnv("CONDA_PREFIX", condaPrefix.c_str()));
Review Comment:
It's possible that the pointer is just empty because we deleted TZDIR too
soon. Let's try reversing that.
--
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]