You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the XMP Specification, Part I, section 8.2.1.2, "the time zone designator need not be present in XMP. When not present, the time zone is unknown, and an XMP processor should not assume anything about the missing time zone."
The go-xmp library parses time fields (e.g. xmp:CreateDate) using the Go time.Parse function, which assumes UTC if it doesn't see a time zone. More fundamentally, the library stores time fields in a Go time.Time structure, which has no way to represent a time without a time zone. There's no way for a library user to tell that the time zone is unknown. As a result, a photo viewer could be showing a "local" time that is many hours off from the correct one.
Since XMP times cannot be faithfully represented in a Go time.Time, it would be best to leave them in string form, and provide the conversion routines as separate functions.
The text was updated successfully, but these errors were encountered:
According to the XMP Specification, Part I, section 8.2.1.2, "the time zone designator need not be present in XMP. When not present, the time zone is unknown, and an XMP processor should not assume anything about the missing time zone."
The go-xmp library parses time fields (e.g. xmp:CreateDate) using the Go time.Parse function, which assumes UTC if it doesn't see a time zone. More fundamentally, the library stores time fields in a Go time.Time structure, which has no way to represent a time without a time zone. There's no way for a library user to tell that the time zone is unknown. As a result, a photo viewer could be showing a "local" time that is many hours off from the correct one.
Since XMP times cannot be faithfully represented in a Go time.Time, it would be best to leave them in string form, and provide the conversion routines as separate functions.
The text was updated successfully, but these errors were encountered: