Library filtering on dates shows UTC-relative capture dates rather than local TZ capture date, but only for some files

  • 1
  • Question
  • Updated 11 months ago
I live in MST/MDT time zone.  When I select a folder such as 2015-12-31, for example, and then show the date-based library filter, and the capture date for photos taken after 6 PM but before midnight is show as January 1st, 2016 rather than December 31st, 2015... but only for this set of files.  I thought that I might have found a bug where Lightroom has done the TZ math to know that 6 PM at -0600 is midnight UTC the next day, but I've looked at December 31sts from other years and the problem doesn't appear.  Has anyone else noticed this behaviour and know what might be causing it -- and more importantly, how I might correct it?  I'm running Lightroom Classic 8.3.1 on Windows.
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
  • puzzled

Posted 12 months ago

  • 1
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
Selecting all the images that have filtered to the off-by-1 date, opening the Edit Capture Time... dialog, and clicking Change (without actually changing anything) seems to correct the problem.  The issue is easy enough to fix, but it is unfortunate that it exists, because you have to notice that the problem exists for some of your images before you can correct it.
(Edited)
Photo of Just Shot Me

Just Shot Me

  • 531 Posts
  • 144 Reply Likes
LR only knows what the image file is telling it. It does not do any Time/Date calculations.
Your cameras assign the date and time to the file. Check your cameras date/time setting.
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
Hi Just Shot Me.

Thanks for your response.

I appreciate that camera date/time mis-configuration can explain this type of behaviour in a lot of cases, but I don't believe that is the problem in this case.  The images which were affected by the problem indicated the proper Date Created value; it was just that the Date column in the Library filter didn't filter the photos according to the Date Created value.

Given that there is the opportunity that there are a number of different spots where LR could look for a capture time, my conclusion that the Date column in the Library filter used a different spot than the Capture Date/Time in the Expanded view for Library grid view cells and the Capture Time field in the Metadata panel.

Cheers!
Photo of John R. Ellis

John R. Ellis, Champion

  • 5131 Posts
  • 1454 Reply Likes
LR has some time-zone bugs. Troubleshooting questions to see if this is an existing bug:

- Does this happen with recently imported photos or just ones from several years ago?

- Are you importing photos using a USB cable connecting to your camera?
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
Hi John.

Thanks for your response.  Just for some context, I've been a LR user since version 3 or 4 after upgrading from Elements.  Presently, I have just over 120K files in my catalog.

From the images that I mentioned in the original description, it happened with photos from 2015 that I had taken of my young children.  The capture time was clearly displayed as being in the 6 and 7 PM range on December 31st, but the Date column of the Library Filter would hide these photos when I selected December 31st, 2015, and show them when I selected January 1st, 2016.  It seems like there is a third copy of Date Created inside LR that wasn't holding the correct value.

I normally import files directly from the camera card into LR through the CF or SD port on my desktop computer.  I might do things a little differently (i.e.: copy the files to a laptop hard drive) when on vacation in order to reuse the cards, but because I wasn't away on vacation on December 31st, 2015, I almost certainly imported them directly from the card.  They would have been imported into LR around that time.

I have been doing to reorganization of my catalog recently, which is why I noticed the problem.  I'm no longer confident that the problem is TZ related as I've seen some other situations where the Date column in the Library filter showed other dates that reflected neither the Date Created metadata or the file creation or modification dates in the file system.  (Although, I could be encountering different problems that I've assumed are the same problem.)  It was almost as if LR had a separate copy of the Date Created metadata (in its sqllite database?) that seemed to fall out of sync for some reason.

I've also been playing around with the "ballet" of modifying the capture time and saving metadata to files.  The order of the operations seems to be significant, but I haven't yet figured out the most robust pattern -- or a pattern that reliably reproduces some problematic behaviour.

There are other operations that I've been taxing in LR, too, such as batch renaming files to Preserved Filename and Original Filename; I get underscores in the names the first time around when the actual names when I perform the operation again.

If I can figure out a pattern to reliably reproduce a problem around anything that I'm doing, I'll definitely report it.  For the time being, I'm happy to hammer away at the metadata and fix what needs fixing until I get what I want.

Cheers!
(Edited)
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
Just to give you an idea of what sort of behaviour that I'm seeing, I spotted a couple of images that were sent to me after-the-fact which I know were taken on an earlier date.

I performed the following steps:
1. Selected the photo, clicks Metadata / Edit Capture Time and corrected the date.
2. Selected the second photo from the same folder and used Sync Metadata to synchronize Date Created (and only Date Created).
3. The result is what I have depicted below.  The modified Date Created for the first photo is respected by both the Date column in the Library filter, as well as the Capture Time sort, but the Date Created value shown for the second photo is not respected (presumably because LR is used a different bucket for Date Created than the cell view is showing).

Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
Regarding the #5 callout in the screen shot, it is meant to say that I'm not actually changing the value of the capture time at all, just invoking the dialog with the images selected, and click the Change button to cause it to rewrite the same values.  It must trigger some other processes in LR that put Date Created into other buckets.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5131 Posts
  • 1454 Reply Likes
Your suspicions are correct. You're tripping over at least three bugs:

1. Internally, LR has several different fields in the SQLite database where it stores various capture dates, and it has long-standing bugs keeping them all in sync.  You'll see inconsistent behavior in the dates shown under thumbnails, in the Metadata panel, in the Filter bar, and how photos sort.

Some of those bugs have been fixed.  Do Help > System Info and verify you're on the latest version 8.3.1 (don't assume you are -- the LR updater often fools people).

You can get all of your photos to have consistent dates by selecting all of them, do Metadata > Edit Capture Time, then Change All. This makes all the internal dates for a photo match what's shown under their thumbnails. 

2. Import also has bugs where the date in the folder name is the capture date expressed in UTC rather than local time.  This can happen when you use a USB cable to import photos, but it may also happen sometimes when you import from an SD card. The only fix for this is to move the photos into the correct photo.

3. Changing the IPTC > Date Created field, either via the Metadata panel, with Sync Metadata, or Metadata > Copy/Paste Metadata, doesn't change LR's internal notion of capture date.  There's no point in doing that.  Doing Metadata > Edit Capture Time / Change All will set IPTC > Date Created to LR's notion of capture date.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5131 Posts
  • 1454 Reply Likes
By the way, you're the first person to win the Triple Crown, reporting symptoms for all three bugs in the same post :->
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
I am using LR 8.3.1.  That version number is displayed on both Help / About and Help / System Info dialogs.

Thanks for the explanation of using Metadata / Edit Capture Time... as to the most robust methods of changing the IPTC Date Created in a way that LR will respect and reflect.  Very useful information, indeed.

I find it handy to use the Sync Metadata on Date Created when I want to change all of the dates to a specific date without trying wrangle the relative dates on each photo to one another, so I intend to keep using it when I need it.  I'll simply follow it up with a Metadata / Edit Capture Time... without actually changing anything to coax LR to put the new value into buckets that it will respect and reflect.
By the way, you're the first person to win the Triple Crown, reporting symptoms for all three bugs in the same post :->
W00T!  :)

Cheers!
Photo of John R. Ellis

John R. Ellis, Champion

  • 5131 Posts
  • 1454 Reply Likes
"I find it handy to use the Sync Metadata on Date Created when I want to change all of the dates to a specific date without trying wrangle the relative dates on each photo to one another, so I intend to keep using it when I need it.  I'll simply follow it up with a Metadata / Edit Capture Time... without actually changing anything to coax LR to put the new value into buckets that it will respect and reflect."

I don't think this will do what you want -- rather than updating the catalog capture date with IPTC Date Created, it will overwrite IPTC Date Created with the capture date for each of the photos.

If you want to set all photos to have the same capture date, the only way to do that is to use the Capture Time to Exif plugin.
Photo of Sean Dockery

Sean Dockery

  • 10 Posts
  • 0 Reply Likes
That is interesting.  I was so sure it was working reliably.  I went to prove it by setting up an experiment with 12 images and then was totally deflated when it didn't work.  LOL.  Yet another procedure in LR that only appeared to work reliably for which I'll have to figure out the pattern of why it apparently worked for me sometimes.

I have the plugin that you mention installed and have used it only periodically in the past to clean up some weird metadata on images from toy cameras we've given to the kids.  It seems like I might need to rely on the plugin a little more.

Cheers!
Photo of John R. Ellis

John R. Ellis, Champion

  • 5131 Posts
  • 1454 Reply Likes
Some of the inconsistencies you're observing could be due to the previous bug fixes in the last year or two.  You imported photos when the bugs were present, assigning them inconsistent capture dates in the catalog. Then a new version of LR fixed the bugs for newly imported photos but didn't try to correct the mess in the catalog for previously imported photos.  The Edit Capture Time workaround above will get all of your photos consistent.