Skip to content

Intern UTC timezone #53429

Closed
Closed

Description

@abalkin
BPO 9183
Nosy @freddrake, @mdickinson, @abalkin
Files
  • issue9183.diff: Patch for the C code
  • issue9183-proto.diff: Patch for the Python code
  • issue9183a.diff: Patch for both C and Python implementations
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/abalkin'
    closed_at = <Date 2010-10-14.17:07:22.573>
    created_at = <Date 2010-07-06.21:55:52.215>
    labels = ['extension-modules', 'easy', 'library', 'performance']
    title = 'Intern UTC timezone'
    updated_at = <Date 2010-10-14.17:07:22.572>
    user = 'https://github.com/abalkin'

    bugs.python.org fields:

    activity = <Date 2010-10-14.17:07:22.572>
    actor = 'belopolsky'
    assignee = 'belopolsky'
    closed = True
    closed_date = <Date 2010-10-14.17:07:22.573>
    closer = 'belopolsky'
    components = ['Extension Modules', 'Library (Lib)']
    creation = <Date 2010-07-06.21:55:52.215>
    creator = 'belopolsky'
    dependencies = []
    files = ['17885', '17889', '18234']
    hgrepos = []
    issue_num = 9183
    keywords = ['patch', 'easy']
    message_count = 4.0
    messages = ['109432', '109444', '111834', '118693']
    nosy_count = 3.0
    nosy_names = ['fdrake', 'mark.dickinson', 'belopolsky']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'commit review'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue9183'
    versions = ['Python 3.2']

    Activity

    1. abalkin commented on Jul 6, 2010

      @abalkin
      MemberAuthor

      Attached patch makes timezone(timedelta(0)) always return the same instance as timezone.utc. See bpo-9051 for pure python implementation.

      With this patch, manipulation of aware datetime objects will be as efficient as that of naive datetime objects. Note that having timezone.utc is not enough to assure that the same tzinfo object is used because aware objects can be produced by datetime.strptime(). With this patch,

      >>> datetime.strptime('2010-07-06 21:39:55 +0000', "%Y-%m-%d %H:%M:%S %z").tzinfo is timezone.utc
      True
    2. self-assigned this
      on Jul 6, 2010
    3. abalkin commented on Jul 7, 2010

      @abalkin
      MemberAuthor

      Python implementation of UTC interning can be done better than the one in bpo-9051. See attached bpo-9183-proto.diff.

    4. abalkin commented on Jul 28, 2010

      @abalkin
      MemberAuthor

      Updated issue9183a.diff patch combines C and Python code changes since datetime.py is now in stdlib. Does anyone want to review before it goes in?

    5. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Jul 28, 2010
    6. abalkin commented on Oct 14, 2010

      @abalkin
      MemberAuthor

      Committed in r85485.

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    easyextension-modulesC modules in the Modules dirperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions