Skip to main content
Inspiring
July 29, 2015

P: Wrong timestamp stored in catalog causing wrong metadata status (all Windows versions)

  • July 29, 2015
  • 66 replies
  • 3667 views

Hi,

The problem I describe below is not new (I observed this at least since version 3) but this time I took the time to investigate more deeply...

From time to time, LR tells me that the XMP file of a given image is no longer in sync with the metadata in the catalog. Most often, this is correct because I made changes without recording the XMP file (Ctrl-S - I'm not using the automatic XMP updating mode). But very often, this information is simply wrong. I didn't change anything to the image and suddenly, the little down arrow appears in the upper right corner of the thumbnail.

Hitting Ctrl-S may or may not fix the problem. Sometimes, the little down arrow reappears after a few seconds or minutes although I didn't do anything (hands away from keyboard and mouse).

I recently did the following test for multiple images unduly displaying the "metadata status changed" flag. I compared the following values :

1. Windows "last modified" timestamp for the XMP file.
2. Value of the xmp:MetadataDate field in the XMP file.
3. touchTime column value for that image in the Adobe_images table of the catalog (which is a SQLite database).

The touchTime value is stored in a special format, so I had a hard time converting it to a readable date/time value. However, I will not explain this and how I navigated the database in order to access this timestamp (this requires some knowledge about databases).

Result:
For all the images tested, values #1 and #2 were always strictly identical. The touchTime value was always off (sometimes about 10-15seconds, sometimes much more). So no wonder that LR thought that the XMP file and the metadata in the catalog were not in sync.

Moreover, the difference in time can be negative of positive. So LR displays the up or down arrow accordingly (meaning that the XMP file is older or newer than the metadata in the catalog, respectively - which is wrong in both cases).

I explained above that sometimes, the image reappears as "not in sync" just a few seconds or minutes after I did a Ctrl-S. In that case, a quick look at the database showed me that the touchTime field had not been updated. So the time difference causing the image to be flagged as "not in sync" was still there. In that case, the problem can be fixed by reading the metadata from the XMP file which was actually correctly updated. This operation updates the catalog and everything is in sync again.

Anyway, there's something very wrong in the computation of the touchTime value of the Adobe_images table. That seems to be obvious. This wrong timestamp generates in turn a wrong metadata status.

I made another interesting test :

1. I started from a situation were 0 image was flagged as "not in sync" with the XMP file.

2. I purged all 1:1 previews and started a Build all 1:1 previews.

3. In Library mode, I setup a filter to show only the images that had the Metadata Status set to "has been changed". I got a cup of coffee and waited.

At the beginning of the generation process, no image was displayed in the grid, as expected. While LR was building the previews, images unduly tagged as "not in sync" started to appear. I got about 200 of them. For all these images, the metadata status was just plain wrong. These were finalized images not modified since a long time and for which the XMP file had been timely updated after the last modification. I checked the touchTime field for some of them and each time it was different from the Windows "last modified" timestamp and from the xmp:MetadataDate field of the XMP file as mentioned above.

So now I know what's going wrong but I'd like to have this problem fixed after all these years.

Thanks in advance.

This topic has been closed for replies.

66 replies

SamoreenAuthor
Inspiring
May 29, 2018
Thanks very much, John.
--Patrick
johnrellis
Legend
May 28, 2018
I copied this version of your post to the first post, correcting the formatting bungled by the forum software.
SamoreenAuthor
Inspiring
May 11, 2018
Please do something about this one. It's incredibly disturbing, given my workflow. It obviously doesn't have the correct priority level in the bug log. This should be fixed since years.

Just a few minutes ago, about 50 images spontaneously and unduly got the "Metadata Status is not up to date" flag and re-appeared in the smart collection I created to collect such items. This is happening every day I'm using LR since years.
--Patrick
SamoreenAuthor
Inspiring
May 4, 2018
Chris,

> In all cases that I've noticed, it seems that LR actually DOES save it properly - it just won't understand that it did.

I would say : it just won't understand when it did 🙂 .
--Patrick
chain569
Participating Frequently
May 4, 2018
I've been putting up with this bug just about since I started learning LR in ~2012.  For these, the  save-read trick resolves them.  However, the problems with the offensive brushings is more recent than that, and is NOT resolved by a save-read.

Very irritating, indeed.

As far as not having to select them individually, there are metadata-status criteria for smart collections which will consolidate them.  For the ones that aren't resolved by a save-read, I then added keywords of something like 'metadata problems', and then did a 'save' and created additional smart collections that filtered out those that were keyworded.

In all cases that I've noticed, it seems that LR actually DOES save it properly - it just won't understand that it did.  So you'll have to be careful to manually save metadata for those you may have keyworded as having problems.  ...  And/or periodically select the smart collection that doesn't filter out the keyworded ones, and do a manual save every once in a while to make sure.

I really wish that Adobe would fix this, one of these decades.
seanruddy
Participating Frequently
May 3, 2018



Wow looks like you have been looking at this bug for a long time.  Thanks for all your effort!  Seems odd that it A) just started on my system B) no particular pattern as to what files are affected.

The inconsistency bugs me.

One thing that is different in my workflow is that I moved homes so I let images stack up without culling and processing... hence I have so, so many files to get through.

SamoreenAuthor
Inspiring
May 3, 2018



Hi Sean,

This is a very old bug that has never been fixed although it has been thoroughly documented and analyzed. The problem is a wrong timestamp stored in the catalog. Please read the following threads :

https://feedback.photoshop.com/photoshop_family/topics/wrong-timestamp-stored-in-lightroom-catalog-c...

 (the first post is badly formatted due a forum issue. Just ignore it. It has been rewritten in a subsequent post)

https://feedback.photoshop.com/photoshop_family/topics/problem-saving-metadata-if-certain-adjustment...

The only known way to (temporarily) get rid of  this issue is to select all affected images, hit Ctrl-S to save the metadata and then use the Metadata | Read from file command to update the catalog with the corect timestamp. But the problem will re-appear later anyway.

--Patrick
seanruddy
Participating Frequently
May 3, 2018


"the metadata for this photo has been changed by both lightroom and another application"
win 10 on a smart raided drive.  System is about 3 years old.  last few months started getting this.  I keep up to date on all software involved. 
No other applications that I am aware of have accessed the files.
I have 30,000 dng files from the last few months with this error randomly mixed into them.  Is there some way to do a mass overwrite from catalog?  Selecting each one individually is extremely tedious.
I can not determine a difference in the files; but I know they have not been edited with other applications.
Inspiring
December 8, 2017
For your information, the timestamps are stored as a time interval (float) that measures the number of seconds elapsed since 2001-01-01T00:00:00Z, that is since the 1st of January 2001 at midnight in UTC time. You can use https://www.epochconverter.com/coredata to do conversions.
SamoreenAuthor
Inspiring
October 2, 2017
Bump!
--Patrick