friendlymatthew commented on PR #7141: URL: https://github.com/apache/arrow-rs/pull/7141#issuecomment-2669528043
> I do have one question, is this the expected behaviour? > > In particular when casting timestamps without a timezone to timestamps with a timezone, the conversion is done preserving the "local" time. > > i.e. > > `2021-01-01 05:45:00.000000` -> `2021-01-01 05:45:00.000000 +0545` > > I therefore wonder if date conversions should behave similarly, i.e. > > `2021-01-01` -> `2021-01-01 00:00:00.000000 +0545` Interesting! Yeah, I agree that we should preserve the local time when casting. [c19dbc5](https://github.com/apache/arrow-rs/pull/7141/commits/c19dbc5369281c963751938a1b86e8f74a266847) resolves this. Now, when we cast a date to a time zone aware timestamp, we do a intermediary cast into a regular `Timestamp`, then attempt to recast with the time zone. /cc @tustvold @Omega359 -- 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]
