Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
I would write the formatting code as follows: ('"%2d-%s-%04d %02d:%02d:%02d %+03d%02d"' % ((tt[2], _month_names[tt[1]], tt[0]) + tt[3:6] + divmod(zone//60, 60))) The above also assumes that month names are stored in a 1-based array: _month_names = [None, 'Jan', ...] Note that %2d format code takes care of space-padding. If you think the expression that I conjured is too cryptic, get the temporal data from timetuple first with say y, m, d, H, M, S = tt[:6] and use named variables in the formatting expression. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11024> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com