gowerc commented on issue #45751:
URL: https://github.com/apache/arrow/issues/45751#issuecomment-2715388481

   Just to add experimenting with a different timezone library 
([link](https://github.com/HowardHinnant/date)) I also get the expected 
2222982812 value:
   
   ```cpp
   #include <iostream>
   #include <chrono>
   #include <date/date.h>
   #include <date/tz.h>
   
   
   int main() {
       date::sys_seconds utc_time{std::chrono::seconds(2222997212)};
       date::zoned_time ny_time{"America/New_York", utc_time};
       std::cout << "Epoch seconds:  " << 
ny_time.get_sys_time().time_since_epoch().count() << std::endl;
       std::cout << "UTC time:       " << date::format("%F %T %Z", utc_time) << 
'\n';
       std::cout << "NY time:        " << date::format("%F %T %Z", ny_time) << 
'\n';
       date::local_seconds naive_local = ny_time.get_local_time();
       std::cout << "NY time naive:: " << 
naive_local.time_since_epoch().count() << "\n";
   }
   ```
   
   Output:
   ```
   Epoch seconds:  2222997212
   UTC time:       2040-06-11 03:13:32 UTC
   NY time:        2040-06-10 23:13:32 EDT
   NY time naive:: 2222982812
   ```


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to