Skip to content

BUG: rendering dt64tz values with non-pytz #49684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 16, 2022

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@@ -136,6 +135,7 @@ def ints_to_pydatetime(
tzinfo new_tz
bint use_date = False, use_ts = False, use_pydt = False
object res_val
bint fold = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So fold never needs to be set to 1 for the repr?

Also fold in the docstring can be removed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So fold never needs to be set to 1 for the repr?

it doesn't matter in pytz cases and it gets set via pointer in non-pytz cases

Also fold in the docstring can be removed

Will do in follow-up if thats OK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah follow up PR is good

@mroeschke mroeschke added this to the 2.0 milestone Nov 16, 2022
@mroeschke mroeschke merged commit 3bca00a into pandas-dev:main Nov 16, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bug-fold branch November 16, 2022 20:29
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
* BUG: rendering dt64tz values with non-pytz

* GH ref

* py38 compat

* compat for no-tzdata
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
* BUG: rendering dt64tz values with non-pytz

* GH ref

* py38 compat

* compat for no-tzdata
@rhshadrach
Copy link
Member

This patch may have induced a potential regression. Please check the links below. If any ASVs are parameterized, the combinations of parameters that a regression has been detected appear as subbullets. This is a partially automated message.

  • https://asv-runner.github.io/asv-collection/pandas/#tslibs.tslib.TimeIntsToPydatetime.time_ints_to_pydatetime
    • box='datetime'; size=100; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='datetime'; size=100; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='datetime'; size=10000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='datetime'; size=10000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='datetime'; size=1000000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='datetime'; size=1000000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='time'; size=100; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='time'; size=100; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='time'; size=10000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='time'; size=10000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='time'; size=1000000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='time'; size=1000000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='timestamp'; size=100; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='timestamp'; size=100; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='timestamp'; size=10000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='timestamp'; size=10000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')
    • box='timestamp'; size=1000000; tz=<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD>
    • box='timestamp'; size=1000000; tz=tzfile('/usr/share/zoneinfo/Asia/Tokyo')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants