PNG 'tIME' chunk not in UTC
Posted: 2017-08-03T09:52:55-07:00
Version: ImageMagick 7.0.6-5 Q16 x64 2017-08-03 (DLL)
Operating System: Windows 7 64-bit
Command:
What it does: populates the 'tIME' chunk without taking the computer's timezone offset into account, i.e. local time (UTC-04:00) is 12:01:23, and it populates 12:01:23. I checked this with "identify -verbose a.png" and it returns "png:tIME: 2017-08-03T12:01:23Z" (with the 'Z' at the end meaning UTC) and a quick check in a hex editor shows "07 E1 08 03 0C 01 17" which is 2017(two bytes, big endian), 8, 3, 12, 1, 23 for year, month, day, hour, minute, second.
What it should do: populate the 'tIME' chunk with the correct modify time, i.e. UTC time. See RFC 2083, section 4.2.8: "Universal Time (UTC, also called GMT) should be specified rather than local time." So this should populate 16:01:23
The 'date:create' and 'date:modify' 'tEXt' chunks are already correct: "identify -verbsoe a.png" shows "date:modify: 2017-08-03T12:01:23-04:00" with the '-04:00' at the end which is indeed correct. This error is only with the 'tIME' chunk. Again, the 'tEXt' chunks are fine, so the thread "create:date and modify:date are always set" is not relevant.
Operating System: Windows 7 64-bit
Command:
Code: Select all
convert -size 1x1 xc:white a.png
What it should do: populate the 'tIME' chunk with the correct modify time, i.e. UTC time. See RFC 2083, section 4.2.8: "Universal Time (UTC, also called GMT) should be specified rather than local time." So this should populate 16:01:23
The 'date:create' and 'date:modify' 'tEXt' chunks are already correct: "identify -verbsoe a.png" shows "date:modify: 2017-08-03T12:01:23-04:00" with the '-04:00' at the end which is indeed correct. This error is only with the 'tIME' chunk. Again, the 'tEXt' chunks are fine, so the thread "create:date and modify:date are always set" is not relevant.