Lightroom: Filenaming time zone - sometimes UTC, sometimes local time zone!

  • 2
  • Problem
  • Updated 2 years ago
In my main catalog, I defined an import file renaming preset that uses date/time. When I import using this preset, the timestamp is UTC. For example, if I shoot a photo at 1pm in California when its daylight savings, the time used in the filename will be 8pm (CA time zone is UTC-8). But, if I import the same photo in a test catalog, with what should be the same preset (I have presets stored with catalog), the time used in the filename is local time, in this example it would be 1pm. Strange but true. I'll investigate further, but at this point, sure seems like a bug... There isn't a setting that controls this that I've missed, is there?

Just confirmed: filenaming preset is identical in both cases except for the id.

Without changing anything, the catalog that was renaming using local time zone is renaming using UTC now. Sounds like a bug alright...

After further research on the web, sounds like this has been a bug for a long time.

Adobe: please fix this!
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
  • hrmphty

Posted 7 years ago

  • 2
Photo of Jim Wilde

Jim Wilde

  • 136 Posts
  • 26 Reply Likes
I can't replicate this problem....LR3.4.1, Win7 64bit. Using a Date and Time renaming template on import, file names are created as expected from the DTO in the file Exif data. Quite why the preset in your main catalog is adding the UTC offset I do not know, maybe it's a problem of some sort in your preset (I saved my template as a new preset and imported using that with the same result). Your test catalog would seem to be working as expected. Have you tried another import but without using the preset, instead create a simple date and time custom template?

Not sure what you found with your research, though there WAS a renaming bug introduced in 3.0 which was mainly fixed in 3.2....although similar to your reported problem it worked the opposite way, i.e. it assumed the DTO was in fact a UTC time and then applied the appropriate offset according to the system regional settings, e.g. in your case it would have converted a shot time-stamped at 13.00 hours and renamed it to 05.00 hours. A variant of that bug is still in 3.4.1, though that only seems to apply to imports via a direct camera connection. Go figure.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
Thanks Jim - I'm also using win7/64 & Lr3.4.1.

Note: The problem is evident even before performing the import.

For example, if I rollover the thumbnail in the import dialog box, it shows local time. The sample filename in the file renaming section shows UTC.

And, from the fact that the test catalog was formatting as local time, then started formatting as UTC, there is proof in my mind that Lightroom has the capacity to go either way.

In my case, it seems to prefer settling on UTC.

Not sure what else to say at this point.

Summary:
=======
Bug affects some people/systems, but not others.
Bug not consistent even on same platform.
Bug has nothing to do with photo or exif. Lightroom is incorrectly formatting computer system time for the sample in the filenaming template.

Local system time was 3 minutes after 2pm in UTC-8 time zone (13:03 without DLS correction):

Note: 13+8=21

The workaround for me is to continue to import using a plugin instead of Lightroom import dialog box, although I was hoping not to have to do that soon - oh well...
Photo of Jim Wilde

Jim Wilde

  • 136 Posts
  • 26 Reply Likes
Well, as I said I can't replicate this problem. Using date and time in my renaming template always produces the correct result on import. I agree that, somewhat oddly, the 'example' renaming format in the file handling panel in the Import screen shows current UTC time (if time is chosen), rather than the current system time as would perhaps be the expected behaviour. But that's hardly an issue, surely? It's the result of the import that matters and as I say that's seems to work correctly on both my PCs.

Anybody else having a problem in this area?
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 363 Reply Likes
Jim - thanks for checking.

I guess there's a bit in there somewhere that's upside down sometimes...

Cheers,
Rob
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
hi, I have a similar bug i think
Some of my photos show the metadata of "date/time of original" in UTC. It seems to be with a group of photos. I found several imported albums to have UTC (i see photos I took during the late morning hours and their time shows to be 2 am - i am in Philippines for a voluntary work with UTC+8 hrs).

Then, after reading your above comments, I imported a few photos from a couple days ago, observing what time it shows before the import and after the import.

surprisingly, metadata is showing the local time before and after the import, instead of UTC.

now, as it does not seem to be a universal problem in my catalog (i have only one catalog following David Marx's tutorials), it means I have to check each and every album for this and it may be some action that I take that triggers a change.

I am doing voluntary work on geotagging photos to document ancestral land domains for indigenous communities. Now this came as a bummer because i also need to synchronize GPS readings from two different trackers and then tag the photos accordingly. (makes me think if the GPS tagging software I use makes the EXIF change).

Will be reading your comments here hoping for an explanation.

Is there a way to double check if the CAMERA had some bug while taking the photos (somehow switch back to UTC+0 and then later back to UTC+8)?
During import on LR3.3 i convert my photos to DNG and then use those in the GPS tagging software, which unfortunately also sees the wrong timing on the photo and cannot match the GPS and my photos. it would be good to know if it is LR that changes the DNG's time of capture in the EXIF data or the camera actually wrote that wrong time in the first place.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 370 Reply Likes
I think its a Lightroom bug, not camera firmware bug. After I first noticed the behavior I did some import testing and had the same photo import once renamed with local time and once renamed with UTC. I haven't done further testing so I don't have more info. Jim says his sample timestamps are UTC (in the rename template) but imports are "always" local.

It seems clear to me that Lightroom has some logic in it somewhere that's deciding whether to apply a UTC adjustment or not when formatting timestamps, but sometimes makes the wrong decision.

Not sure what else to say, except: "Be sure to tick the '+1' button at top", otherwise Adobe may just roll their eyes, shake their heads, and move on to the next problem report...

Note: Last time I checked, Lightroom was consistently importing with UTC adjusted time. I just did a spot check and the import came in with local time. Tried a few more tests: Got error: "File was imported, but could not be renamed" - photo appears "missing". Retried, and file renamed but with a -2 appended, indicating file was renamed last time, but Lightroom got confused... More often than not now, Lightroom is getting the "can't rename error" even though photo was renamed, then it can't find the photo. - Looks like I've discovered another bug!

I guess I'll stick with my import plugin for now - its exhibiting no anomalous behavior.
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
thanks Rob.

Could you tell me about your import plugin? is it windows specific? or could i apply it on my Mac LR3.3?

i realize that GPS recording also has some problems in my case. Some software add my +8hrs (and tell me about it) while others don't. It must be to do with some settings but I have not figured them out.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
Hi Inca,

I try not to say too much about my plugins on the forum, since it gets irksome to some of the frequent forumers. But here's the web page:

RC Importer
Photo of Mark Sirota

Mark Sirota

  • 146 Posts
  • 28 Reply Likes
I have a guess about this, assuming I understand the problem correctly.

Is it the case that some catalogs exhibit this problem, and others don't? And any given catalog will exhibit or not exhibit the problem consistently?

I'm guessing that catalogs created before LR3.4 might behave differently than catalogs created with LR3.4 or later. That's because 3.4 was the first version that followed MWG 2.0 guidance, which is specific about how to handle time zones for EXIF fields that don't include it.

Just a guess. Please let me know whether I'm right.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Hi Mark - not just a catalog thing - same catalog has capacity to go either way...
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
here is a few others with some symptoms.

http://forums.adobe.com/message/3761772

@Mark, i have only one catalog. Some albums have this timing problem some do not. I have not had time to investigate if there is a pattern (got quite a few albums and right now doing voluntary fieldwork with limited time left in the field).

It's not just in renaming, but as mentioned, by changing the EXIF. I say this because I do not use time in my renaming presets--only date.
But time is important on my GPS matching, so there I notice the problem.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
In my experience, the capture date-time in exif as read by exiftool is not changing - not sure about "as recorded in Lightroom" (I should have checked that).
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
oh, BTW, thanks Rob. I'll take a look. It talks about the ability to import videos too.. A different discussion topic for me. Won't divert the topic here though.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
OK. my case seems to be solved: stupidity.

i traced my albums since I left Europe and through Singapore and Malaysia, and first few days in Philippines I seem to have come with my home time on the camera.
I noticed when I saw one album, in the middle of which my time seems to have been converted to local time. I must have realized that I had forgotten to set my camera, that day. Then probably I fixed it and forgot all about it.

At least that's how it looks at the moment. Almost 4 am. I give up for tonight.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
It happens sometimes, and because it happens sometimes I came up with this (so far not too popular) 'Idea' you may want to vote on:

Time zone correction upon import: http://feedback.photoshop.com/photosh...
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
oh, if you happen to know how to batch-change exif time data, that'll probably be useful when I wake up.

If I am right about the above theory, apologies for having had the forum crowded.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Lightroom menu bar -> Metadata -> Edit Capture Time...

Another way to batch correct exif time is using exiftool. I *think* Lightroom will see the file has changed and re-read capture time (correct me if that's wrong).
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
Thanks Rob.
Do you know about the "Metadata > Update DNG Preview and Metadata" property?
Is it WRITING to the file or is it READING from the file?

If it is the latter, i can use that to re-read capture time.
Will try to test it now for my GPS corrections and will let you know if I understand it.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
"Update DNG preview..." writes to the DNG not the other way around.
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
i am very forgetful, that i know. But there is a slight chance i might not be as silly as i thought:
i compared two photos from my same album , the former seemingly taken at 2 am, the latter at 12 am, while i remember taking both in the same morning.
This was when I thought, as mentioned above, that I had realized my time zone being set at home and had changed it.

But using an inspector application, I compared the photos' exif data as below:
Under XMP-exif section of the txt file produced by the inspector:
Date/Time Original : 2011:05:16 02:03:01.25+08:00
and
Date/Time Original : 2011:05:16 11:58:12.08+08:00

whereas on the ExifIFD section and in Composite section the "+08:00" is not written. Perhaps LR works with the ExifIFD or Composite, whatever they are?

:) i was just warned i cannot send the above message because it has profanity. Grrr, where, which word? :)
Photo of Mark Sirota

Mark Sirota

  • 146 Posts
  • 28 Reply Likes
Do you still have the SOOC originals to inspect, or only the converted DNGs? Or were these DNGs out of camera?
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
Nope. I convert the NEF files upon import, into DNG and then format my SD cards.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Consider an FR/Idea to backup the NEF instead of the DNG when converting to DNG upon import.
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
hmm, now that you mention it, yes, i should have thought of this before.

FR/Idea?
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 371 Reply Likes
Click 'Create a New Topic' button at top of this page, then select 'Idea' from the dropdown. FR stands for Feature Request - sorry for being acronymonious...

I beat you to it: http://feedback.photoshop.com/photosh...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
Hmmm..... you may be on to something. This could be a metadata issue - Lightroom has the capacity to use one or another exif field and if it uses one that is missing the UTC offset, or if another app updates the time or something... - hmm....

profanity filter kicks in when there is any kind of trouble it seems, even like network errors and stuff. - a couple things:

1. don't mispell assess.
2. d-i-n-k is a naughty word
;-}

Consider casting a vote to enhance the profanity filter on this site: http://feedback.photoshop.com/photosh...
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
here is another finding:
i inspected another photo which I had taken in Cyprus before coming to the Philippines. There time zone is +2:00

I imported that photo to LR AFTER i came to the Philippines, which is when my computer was in +8 zone.

the XMP-exif reading shows this:
2011:04:06 07:14:11.51+08:00

so, i start to think the +8:00 here is added by the operating system, not by the camera or the LR.
Photo of Inca T

Inca T

  • 12 Posts
  • 0 Reply Likes
unless I kept messing with my camera, something is wrong.
I have been changing times of my photos and found two albums with some of the photos in the correct time zone.

No idea now how this all happened.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3378 Posts
  • 848 Reply Likes
Inca T wrote, "so, i start to think the +8:00 here is added by the operating system, not by the camera or the LR."

I believe your version of LR (3.3) will add XMP:DateTimeOriginal by taking the local time that's recorded in EXIF:DateTimeOriginal and adding the local time zone (as configured in your OS). Industry standards don't allow EXIF:DateTimeOriginal to have time zones, and the old version of the standard that LR 3.3 was following required XMP:DateTimeOriginal to have a time zone.

LR 3.4 has changed its handling of metadata dates considerably to accommodate a new version of the standards (the Metadata Working Group). Unfortunately, LR doesn't strictly follow the standards regarding dates. However, in the new standard, the time zone in metadata dates is optional and LR should never add a time zone (though it should preserve any that other software adds).

So I recommend that before you spend any more time tearing out your hair over this, upgrade to LR 3.4. Then if you continue to encounter oddities, posting before and after versions of suspect files here will let others of us help troubleshoot the metadata problems.
Photo of Walter Neser

Walter Neser

  • 1 Post
  • 0 Reply Likes
So, Five years later...
I'm running LR4.4 on a Mac
My timezone is GMT+2
I import images captured at the same or similar times, by two different apps running on the same device. Both sets of images show correct times in exif, and display correct times in the info overlaid on the images while browsing the library, but they sort incorrectly, the one batch, sort two hours earlier than the other.
Here is where it gets weird:
To correct the order, I do the following:
Select misbehaved batch, LR Menu -> Metadata -> Edit Capture Time
Here I select Shift Time by Set number of Hours and select shift by  (0) ZERO hours and it fixes it!?!?!?! Go figure...
Photo of John R. Ellis

John R. Ellis, Champion

  • 2510 Posts
  • 516 Reply Likes
Are you importing into LR via a USB cable?  One cause of time-zone bugs is importing via a USB cable directly into LR; for most people, at least, importing via card reader avoids the bug.  Very annoying that the bug hasn't been fixed.
(Edited)