Merge pull request #1999 from jim-easterbrook/bug_1998

Restore modified tags after TZ manipulation
This commit is contained in:
Kevin Backhouse
2021-12-05 15:02:46 +00:00
committed by GitHub
3 changed files with 42 additions and 5 deletions
+28
View File
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
import system_tests
from system_tests import CaseMeta, path
class TestXmpDateTimeSetting(metaclass=CaseMeta):
"""
Test fix for issue 1998.
"""
infile = path("$data_path/issue_1998.xmp")
commands = [
"$exiv2 -M\"set Xmp.xmp.CreateDate XmpText 2021-02-03T12:00:00+01:00\" $infile",
"$exiv2 -K Xmp.xmp.CreateDate $infile",
"$exiv2 -M\"set Xmp.xmp.CreateDate XmpText 2021-02-03T12:34:56+02:00\" $infile",
"$exiv2 -K Xmp.xmp.CreateDate $infile",
]
stdout = [
"",
"""Xmp.xmp.CreateDate XmpText 25 2021-02-03T12:00:00+01:00
""",
"",
"""Xmp.xmp.CreateDate XmpText 25 2021-02-03T12:34:56+02:00
""",
]
stderr = [""]*4
retval = [0]*4