fix locale/encoding related problems with strftime

Alternative fix to #77, avoids string decoding issues around python2/python3