Github user wgtmac commented on a diff in the pull request:
https://github.com/apache/orc/pull/233#discussion_r175257109
--- Diff: c++/src/ColumnPrinter.cc ---
@@ -710,7 +713,10 @@ namespace orc {
writeString(buffer, "null");
} else {
int64_t nanos = nanoseconds[rowId];
- time_t secs = static_cast<time_t>(seconds[rowId]);
+ // adjust the second to gmt timezone so that we can print same value
+ // in writer's timezone
+ time_t secs = static_cast<time_t>(seconds[rowId] +
+ writerTimezone->getVariant(seconds[rowId]).gmtOffset);
struct tm tmValue;
gmtime_r(&secs, &tmValue);
char timeBuffer[20];
--- End diff --
Good idea! But I don't think we have simple timezone acronyms on hand so I
prefer to ignore it for now.
---