Github user stiga-huang commented on a diff in the pull request: https://github.com/apache/orc/pull/233#discussion_r175257358 --- 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 -- I think we can simply use `TimezoneVariant::name` as the acronyms.
---