ShivanshhhG commented on PR #54684:
URL: https://github.com/apache/arrow/pull/54684#issuecomment-6415922002

   Thank you for the detailed feedback @dmitry-chirkov-dremio!
   
   I have updated the PR accordingly:
   1. **Preserved `%z` / `%Ez` formatting contract in `date.h`**: Reverted all 
changes to vendored `date.h` so that `%z` and `%Ez` continue adhering to their 
standard contracts (`±hhmm` and `±hh:mm`).
   2. **Sub-minute offset fallback to UTC in `ConvertZoned`**: When casting a 
zoned timestamp to string, if the timestamp instant has a sub-minute offset 
(`offset % 60 != 0`), it is formatted in UTC (`...Z`) as suggested in GH-54534 
to preserve the exact stored instant without emitting an inaccurate local wall 
offset. Updated expected values in `scalar_cast_test.cc`.
   3. **Unified timezone format validation in `Strftime::Make` and `GetZone`**: 
Added `FormatHasZone` helper function recognizing `%Ez` alongside `%z` and 
`%Z`. If an unzoned timestamp is passed to `Strftime` with `%Ez`, it is 
properly rejected with `"Invalid: Timezone not present, cannot convert to 
string with timezone: ..."`.
   4. **Added Unit Tests**: Added test cases for `%Ez` both with a timezone 
(e.g. `Asia/Kolkata` -> `+05:30`) and without a timezone (verifying rejection) 
in `scalar_temporal_test.cc`.


-- 
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]

Reply via email to