diff --git a/xmpsdk/include/TXMPUtils.hpp b/xmpsdk/include/TXMPUtils.hpp index c3143b83..782ce73a 100644 --- a/xmpsdk/include/TXMPUtils.hpp +++ b/xmpsdk/include/TXMPUtils.hpp @@ -436,7 +436,7 @@ public: /// /// \note As compatibility "tactics" (OK, hacks), a missing date portion or missing TZD are /// tolerated. A missing date value may begin with "Thh:" or "hh:"; the year, month, and day are - /// all set to zero in the XMP_DateTime value. A missing TZD is assumed to be UTC. + /// all set to zero in the XMP_DateTime value. If TZD is missing, assume the time is in local time. /// /// \param strValue The ISO 8601 string representation of the date/time. /// diff --git a/xmpsdk/src/XMPUtils.cpp b/xmpsdk/src/XMPUtils.cpp index 1d8c1d81..a72f2dd2 100644 --- a/xmpsdk/src/XMPUtils.cpp +++ b/xmpsdk/src/XMPUtils.cpp @@ -1262,7 +1262,7 @@ XMPUtils::ConvertToFloat ( XMP_StringPtr strValue ) // Note that ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow // any year, even negative ones. The year is formatted as "%.4d". -// ! Tolerate missing TZD, assume is UTC. Photoshop 8 writes dates like this for exif:GPSTimeStamp. +// ! Tolerate missing TZD, assume the time is in local time // ! Tolerate missing date portion, in case someone foolishly writes a time-only value that way. // *** Put the ISO format comments in the header documentation. @@ -1396,6 +1396,10 @@ XMPUtils::ConvertToDate ( XMP_StringPtr strValue, if ( temp > 59 ) XMP_Throw ( "Time zone minute is out of range", kXMPErr_BadParam ); binValue->tzMinute = temp; + } else { + + XMPUtils::SetTimeZone( binValue ); + } if ( strValue[pos] != 0 ) XMP_Throw ( "Invalid date string, extra chars at end", kXMPErr_BadParam );