When getting CreateionDate of PHAsset, the time returned is in UTC format. In order to display it correctly, so as to meet user's expectation that e.g. captured image of sunset was in the evening hours, not in the middle of night or day (depending on time-zone shift to UTC), the application needs to format the UTC date-Time by considering the timezone of the photo location.
I wrote a code, which handles this, and it works ok, but only for pictures which have geolocation and were taken with the iPhone camera, which is "aware" of time zone and so the UTC time it sets is correct. However if I open an image (asset) from PhotoLibrary which was taken with a camera not being "aware" of timezone concept (it only has a local time clock, which needs to be shifted when traveling to another timezone), than such a photo creation date refers to a non-UTC time (I guess that PhotoKit tries to derive UTC time of a photo - based on current for importing process local time shift against UTC-time - of the device used for importing).
If picture has geolocation, and the Creation Time is really UTC, I can derive timezone, and based on it I can format correctly UTC time to local time (of moment when picture was being taken). If the picture does not have geolocation, then I can't, despite the asset creation time is really UTC - User for some images may want to clear geolocation. Then I'm left with incorrect creation time (it is UTC but I don't know for which time zone I should format it)
The question is - how can I diffrentiate PHAsset's CreationDate - to know whether the value is, or is not time-zone "aware"? And, when knowing this, how to shift to proper timezone (to display local time of taking the picture), when there is no geolocation ?
The iOS and Mac Photos Application displaying images from Photo Library seem to deal with this problem fine, as these display for these legacy photos just the EXIF date-time (what is ok, as long as the legacy camera had its local time correctly set to local time upon traveling, what can be assumed).
So, based on what does Photos App pick either [ready to display Exif Date] or [UTC Asset Creation Date] ?