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.

Author jwilk
Recipients jwilk
Date 2013-06-03.20:51:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370292662.79.0.797202814422.issue18128@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2013-06-03 20:51:02jwilksetrecipients: + jwilk
2013-06-03 20:51:02jwilksetmessageid: <1370292662.79.0.797202814422.issue18128@psf.upfronthosting.co.za>
2013-06-03 20:51:02jwilklinkissue18128 messages
2013-06-03 20:51:02jwilkcreate