Fix unittest issue related to python2/python3 differences
Fix unittest issue related to python2/python3 differences

Under python 2, with non-ascii locales, u"{:%b}".format(date) can raise UnicodeDecodeError
because u"{:%b}".format(date) will call date.__format__(u"%b"), which will return a byte string
and not a unicode string.
eg:
locale.setlocale(locale.LC_ALL, 'ja_JP.utf8')
date.__format__(u"%b") == '12\xe6\x9c\x88' # True

This commit catches UnicodeDecodeError and calls date.__format__() with byte strings instead
of characters, since it to work with character strings

sunzhongwei/pelican,kennethlyn/pelican,alexras/pelican,karlcow/pelican,simonjj/pelican,ls2uper/pelican,deved69/pelican-1,crmackay/pelican,zackw/pelican,number5/pelican,11craft/pelican,deved69/pelican-1,HyperGroups/pelican,douglaskastle/pelican,deanishe/pelican,kennethlyn/pelican,GiovanniMoretti/pelican,UdeskDeveloper/pelican,iurisilvio/pelican,jvehent/pelican,rbarraud/pelican,jo-tham/pelican,deanishe/pelican,goerz/pelican,UdeskDeveloper/pelican,koobs/pelican,JeremyMorgan/pelican,number5/pelican,treyhunner/pelican,garbas/pelican,crmackay/pelican,simonjj/pelican,janaurka/git-debug-presentiation,lazycoder-ru/pelican,florianjacob/pelican,ls2uper/pelican,getpelican/pelican,jvehent/pelican,Scheirle/pelican,jimperio/pelican,crmackay/pelican,simonjj/pelican,talha131/pelican,catdog2/pelican,Summonee/pelican,garbas/pelican,joetboole/pelican,Summonee/pelican,Polyconseil/pelican,alexras/pelican,iKevinY/pelican,kernc/pelican,jo-tham/pelican,garbas/pelican,karlcow/pelican,deved69/pelican-1,ingwinlu/pelican,lucasplus/pelican,deanishe/pelican,gymglish/pelican,iurisilvio/pelican,ehashman/pelican,JeremyMorgan/pelican,farseerfc/pelican,levanhien8/pelican,zackw/pelican,btnpushnmunky/pelican,number5/pelican,catdog2/pelican,Rogdham/pelican,arty-name/pelican,11craft/pelican,TC01/pelican,Scheirle/pelican,Summonee/pelican,jvehent/pelican,jimperio/pelican,TC01/pelican,talha131/pelican,51itclub/pelican,iKevinY/pelican,kennethlyn/pelican,51itclub/pelican,11craft/pelican,gymglish/pelican,sunzhongwei/pelican,catdog2/pelican,farseerfc/pelican,lucasplus/pelican,rbarraud/pelican,Scheirle/pelican,51itclub/pelican,eevee/pelican,eevee/pelican,florianjacob/pelican,Rogdham/pelican,ehashman/pelican,ingwinlu/pelican,lazycoder-ru/pelican,getpelican/pelican,zackw/pelican,kernc/pelican,koobs/pelican,lazycoder-ru/pelican,eevee/pelican,goerz/pelican,avaris/pelican,abrahamvarricatt/pelican,douglaskastle/pelican,levanhien8/pelican,treyhunner/pelican,GiovanniMoretti/pelican,karlcow/pelican,joetboole/pelican,btnpushnmunky/pelican,JeremyMorgan/pelican,alexras/pelican,HyperGroups/pelican,treyhunner/pelican,Rogdham/pelican,HyperGroups/pelican,douglaskastle/pelican,justinmayer/pelican,btnpushnmunky/pelican,lucasplus/pelican,janaurka/git-debug-presentiation,kernc/pelican,0xMF/pelican,sunzhongwei/pelican,goerz/pelican,ls2uper/pelican,GiovanniMoretti/pelican,Polyconseil/pelican,joetboole/pelican,sunzhongwei/pelican,iurisilvio/pelican,UdeskDeveloper/pelican,koobs/pelican,jimperio/pelican,abrahamvarricatt/pelican,abrahamvarricatt/pelican,florianjacob/pelican,levanhien8/pelican,ehashman/pelican,TC01/pelican,janaurka/git-debug-presentiation,rbarraud/pelican,gymglish/pelican,avaris/pelican