New submission from Jakub Wilk: 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) ---------- messages: 190563 nosy: jwilk priority: normal severity: normal status: open title: pygettext: non-standard timestamp format in POT-Creation-Date _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18128> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com