Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue18128

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:pygettext: non-standard timestamp format in POT-Creation-Date
Type:behaviorStage:resolved
Components:Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: barry, flipmcf, jwilk, python-dev, r.david.murray
Priority:normalKeywords:patch

Created on2013-06-03 20:51 byjwilk, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
iss18128.patchflipmcf,2015-04-14 23:19review
issue18128.patchflipmcf,2015-04-15 19:05review
Messages (10)
msg190563 -(view)Author: Jakub Wilk (jwilk)Date: 2013-06-03 20:51
pygettext uses non-standard timestamp format in the POT-Creation-Date field. For example:POT-Creation-Date: 2013-06-03 22:31+CESTwhereas xgettext uses this format:POT-Creation-Date: 2013-06-03 22:31+0200You could use this code to generate timestamps in the same format as xgettext:from time import time, localtime, strftimefrom calendar import timegmdef gettext_timestamp():    now = int(time())    nowtuple = localtime(now)    offset = timegm(nowtuple) - now    sign = '-' if offset < 0 else '+'    hour, minute = divmod(abs(offset) // 60, 60)    return strftime('%Y-%m-%d %H:%M', nowtuple) + sign + '%02d%02d' % (hour, minute)
msg190564 -(view)Author: Barry A. Warsaw (barry)*(Python committer)Date: 2013-06-03 20:54
It's probably worth changing.  My only concern would be backwards compatibility issues.
msg241025 -(view)Author: Michael McFadden (flipmcf)*Date: 2015-04-14 20:52
I'm going to be adding some tests around pygettext tool and then tackling this.
msg241055 -(view)Author: Michael McFadden (flipmcf)*Date: 2015-04-14 23:19
Patch File iss18128.patch adds test_i18n to start testing the entireTools/i18n package, and has a very simple fix.
msg241144 -(view)Author: Michael McFadden (flipmcf)*Date: 2015-04-15 19:05
Post-review - new patch
msg241162 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2015-04-15 21:14
Barry, would you be OK with just applying this to 3.5?  We can add a porting note to whatsnew.  My guess, though, is that no one is going to notice.
msg241163 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2015-04-15 21:16
Oh, I forgot to say that the patch looks good to me.
msg241168 -(view)Author: Barry A. Warsaw (barry)*(Python committer)Date: 2015-04-15 21:48
@rdm: I'm pretty sure you're right about nobody noticing. :)  Make it so!
msg241232 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-04-16 16:20
New changesetc969413584cf by R David Murray in branch 'default':#18128: use standard +NNNN timezone format in POT-Creation-Date header.https://hg.python.org/cpython/rev/c969413584cf
msg241233 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2015-04-16 16:21
Thanks, Michael.
History
DateUserActionArgs
2022-04-11 14:57:46adminsetgithub: 62328
2015-04-16 16:21:23r.david.murraysetstatus: open -> closed
versions: + Python 3.5
type: behavior
messages: +msg241233

resolution: fixed
stage: resolved
2015-04-16 16:20:23python-devsetnosy: +python-dev
messages: +msg241232
2015-04-15 21:48:01barrysetmessages: +msg241168
2015-04-15 21:16:48r.david.murraysetmessages: +msg241163
2015-04-15 21:14:28r.david.murraysetnosy: +r.david.murray
messages: +msg241162
2015-04-15 19:06:00flipmcfsetfiles: +issue18128.patch

messages: +msg241144
2015-04-14 23:19:16flipmcfsetfiles: +iss18128.patch
keywords: +patch
messages: +msg241055
2015-04-14 20:52:52flipmcfsetnosy: +flipmcf
messages: +msg241025
2013-06-03 20:54:38barrysetmessages: +msg190564
2013-06-03 20:53:49barrysetnosy: +barry
2013-06-03 20:51:02jwilkcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp