This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年06月03日 20:51 by jwilk, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| iss18128.patch | flipmcf, 2015年04月14日 23:19 | review | ||
| issue18128.patch | flipmcf, 2015年04月15日 19:05 | review | ||
| 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+CEST
whereas xgettext uses this format:
POT-Creation-Date: 2013年06月03日 22:31+0200
You could use this code to generate timestamps in the same format as xgettext:
from time import time, localtime, strftime
from calendar import timegm
def 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 entire Tools/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 changeset c969413584cf 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 | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:46 | admin | set | github: 62328 |
| 2015年04月16日 16:21:23 | r.david.murray | set | status: open -> closed versions: + Python 3.5 type: behavior messages: + msg241233 resolution: fixed stage: resolved |
| 2015年04月16日 16:20:23 | python-dev | set | nosy:
+ python-dev messages: + msg241232 |
| 2015年04月15日 21:48:01 | barry | set | messages: + msg241168 |
| 2015年04月15日 21:16:48 | r.david.murray | set | messages: + msg241163 |
| 2015年04月15日 21:14:28 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg241162 |
| 2015年04月15日 19:06:00 | flipmcf | set | files:
+ issue18128.patch messages: + msg241144 |
| 2015年04月14日 23:19:16 | flipmcf | set | files:
+ iss18128.patch keywords: + patch messages: + msg241055 |
| 2015年04月14日 20:52:52 | flipmcf | set | nosy:
+ flipmcf messages: + msg241025 |
| 2013年06月03日 20:54:38 | barry | set | messages: + msg190564 |
| 2013年06月03日 20:53:49 | barry | set | nosy:
+ barry |
| 2013年06月03日 20:51:02 | jwilk | create | |