Skip to content
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

add strptime(s, '%s') #66442

Closed
4kir4 mannequin opened this issue Aug 21, 2014 · 4 comments
Closed

add strptime(s, '%s') #66442

4kir4 mannequin opened this issue Aug 21, 2014 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@4kir4
Copy link
Mannequin

4kir4 mannequin commented Aug 21, 2014

BPO 22246
Nosy @abalkin, @4kir4, @pganssle
Files
  • draft-strptime-%s.diff
  • 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 = None
    created_at = <Date 2014-08-21.23:48:56.540>
    labels = ['type-feature', 'library']
    title = "add strptime(s, '%s')"
    updated_at = <Date 2020-03-18.18:00:00.204>
    user = 'https://github.com/4kir4'

    bugs.python.org fields:

    activity = <Date 2020-03-18.18:00:00.204>
    actor = 'brett.cannon'
    assignee = 'belopolsky'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2014-08-21.23:48:56.540>
    creator = 'akira'
    dependencies = []
    files = ['36431']
    hgrepos = []
    issue_num = 22246
    keywords = ['patch']
    message_count = 3.0
    messages = ['225624', '238840', '270534']
    nosy_count = 3.0
    nosy_names = ['belopolsky', 'akira', 'p-ganssle']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22246'
    versions = ['Python 3.6']

    @4kir4
    Copy link
    Mannequin Author

    4kir4 mannequin commented Aug 21, 2014

    bpo-12750 makes strftime('%s') portable. For symmetry,
    datetime.strptime(s, '%s') could be enabled to return local time as an
    aware (to avoid loosing info) datetime object for a given integer
    (seconds since the Epoch) timestamp string.

    I've uploaded a prototype patch with a draft implementation, docs, and
    tests.

    @4kir4 4kir4 mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 21, 2014
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Mar 21, 2015

    It's a comprehensive patch so can we have a formal review please.

    @abalkin abalkin self-assigned this Jul 16, 2016
    @abalkin
    Copy link
    Member

    abalkin commented Jul 16, 2016

    With PEP-495, conversion from timestamp to naive datetime will no longer loose information. In light of this, I would like to reconsider what strftime('%s') should return in the absence of %z.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @StanFromIreland
    Copy link
    Contributor

    This is a duplicate: #56959

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    Development

    No branches or pull requests

    3 participants