summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8fbe073)
use verbose but safe syntax so this works with all versions of sed, e.g. osx
import zipfile
import calendar
from binascii import hexlify, unhexlify
import zipfile
import calendar
from binascii import hexlify, unhexlify
-from datetime import datetime
+from datetime import datetime, timezone
from xml.dom.minidom import Document
from . import _
from xml.dom.minidom import Document
from . import _
common.assert_config_keystore(common.config)
repodict = collections.OrderedDict()
common.assert_config_keystore(common.config)
repodict = collections.OrderedDict()
- repodict['timestamp'] = datetime.utcnow()
+ repodict['timestamp'] = datetime.utcnow().replace(tzinfo=timezone.utc)
repodict['version'] = METADATA_VERSION
if common.config['repo_maxage'] != 0:
repodict['version'] = METADATA_VERSION
if common.config['repo_maxage'] != 0:
! test -e repo/index.xml.asc
fi
! test -e repo/index.xml.asc
fi
+v0timestamp=`$sed -n -e 's,.*timestamp="\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\)".*,\1,p' repo/index.xml`
+v1timestamp=`$sed -n -e 's,.*"timestamp": \([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*,\1,p' repo/index-v1.json`
+test $v0timestamp -eq $v1timestamp
+
# we can't easily reproduce the timestamps for things, so just hardcode them
$sed -i.tmp -e 's,timestamp="[0-9]*",timestamp="1480431575",' repo/index.xml
diff -uw $WORKSPACE/tests/repo/index.xml repo/index.xml
# we can't easily reproduce the timestamps for things, so just hardcode them
$sed -i.tmp -e 's,timestamp="[0-9]*",timestamp="1480431575",' repo/index.xml
diff -uw $WORKSPACE/tests/repo/index.xml repo/index.xml