• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • It's Lightroom update time again. Just some small tweaks as well as cameras/lenses and bugs! See this blog post for Lightroom Classic and this blog post for the Lightroom Cloud Ecosystem changes.

Import Rename by UTC on Import

Status
Not open for further replies.
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
Operating System: Windows 10
Exact Lightroom Version (Help menu > System Info): LR 6.13 or Classic CC 7.0.1

My import file renaming is based on YYYYMMDD_HHmmss_Index number.
Is there an easy way to get Lightroom to use the UTC time for file renaming on import?

When flying between Australia and the USA, I cross the international dateline and arrive in LA a few hours before I left Sydney.... Since I often have lots of photos at both airports (and through the window leaving and arriving) sorting these photos by date in Lightroom is a mess.

Since we have physically moved a few times (and plan to return to Australia), and I have photos changing timezones all the time, I thought this may be a clean way of naming the file (perhaps with a Z after the time to remind myself what I did).

Would an exiftool script be the only way to achieve this?

Christelle
 
Joined
Sep 23, 2014
Messages
1,904
Location
Waltham MA
Lightroom Experience
Beginner
Lightroom Version
I did this by keeping the camera and everything in EST.
I used a script a long time ago to deal with my historical images. At some point, I know I am going to need to switch to UTC.

Tim

Sent from my LG-TP260 using Tapatalk
 
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
@tspear,

I am not too worried about having to do the renaming as a script for the historical files (I managed to lose my fear of the command line / scripting) and setting UTC on the Nikon is an easy and solution.

But how do you propose handling iPhone photos (and the new GoPro that set its timezone automatically)? I would typically want to import the iEverything photos from all the iDevices being used by my husband and I automatically — they go into a temporary holding structure so that I can cull screenshots and memes and saved copies of photos that we sent one another.... Renaming would happen once these files get moved to their permanent folders.

Any suggestions?

Christelle
 

Wernfried

Active Member
Joined
Jan 31, 2017
Messages
161
Lightroom Experience
Intermediate
Lightroom Version
One simple solution would be not to rename any file while import - what is the reason for that?
All information is available in EXIF and LR Metadata, I don't see any need to embed the date/time in the filename.
 
Joined
Sep 23, 2014
Messages
1,904
Location
Waltham MA
Lightroom Experience
Beginner
Lightroom Version
@tspear,

I am not too worried about having to do the renaming as a script for the historical files (I managed to lose my fear of the command line / scripting) and setting UTC on the Nikon is an easy and solution.

But how do you propose handling iPhone photos (and the new GoPro that set its timezone automatically)? I would typically want to import the iEverything photos from all the iDevices being used by my husband and I automatically — they go into a temporary holding structure so that I can cull screenshots and memes and saved copies of photos that we sent one another.... Renaming would happen once these files get moved to their permanent folders.

Any suggestions?

Christelle

I abandoned iPhones years ago, and never looked back :D
And I just got my new Crapdows machine up and working this week. So no more Apple Mac.... Only Apple left is my super old iPod classic (which Apple killed off, after calling it classic a couple years later).
On the rare occasion I take pictures with my Android phone, I have this really cool feature. Set time automatically, set timezone automatically disabled
If you can handle the command line, fix the timezone before importing the files to Lr. Convert all the images via scripts to UTC as the first step.

Tim
 
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
One simple solution would be not to rename any file while import - what is the reason for that?
All information is available in EXIF and LR Metadata, I don't see any need to embed the date/time in the filename.

@Wernfried, as I explained in my original post, using the local time to sort (which is what Lightroom does if I do not give it another option), means the files are out of order if you happen to “travel back in time” as you cross timezones. I usually shoot with more than one camera at a time, so just the normal filename / number doesn’t work either.

Plus, I have Nikon raw files going back to 2006 in my catalog. There are so many copies of files with the same original DSC_xxxx.NEF name... In the catalog it is not a problem, but I also export these to a private web gallery where my family can see and comment on them. Each file needs to have a unique name.

Christelle
 
Last edited:

Wernfried

Active Member
Joined
Jan 31, 2017
Messages
161
Lightroom Experience
Intermediate
Lightroom Version
Latest EXIF standard supports also time-zone information, so in general you should have several possibilities.

Which camera do you use? Does it support already time zone in EXIF data (Check if EXIF version >= 2.31 wiht exiftool)?
What is the time on your camera? Always UTC or do you change to time always to local time when you travel?
 
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
I abandoned iPhones years ago, and never looked back

This is not going to work for me... I should have my new iPhone X before Christmas :laugh:

I started taking photos with the iPhone to log the GPS position for when I forgot the exteral GPSlogger doo-dad or when I forgot to charge it... Now you can get pretty decent snaps, and it’s a bit less obtrusive if you’re walking down the street!

Christelle
 
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
Latest EXIF standard supports also time-zone information, so in general you should have several possibilities.

Which camera do you use? Does it support already time zone in EXIF data (Check if EXIF version >= 2.31 wiht exiftool)?
What is the time on your camera? Always UTC or do you change to time always to local time when you travel?

@Wernfried,

I use(d) several cameras -
  • The Nikon D1X, D200, D80 and D700, did not support the time-zone information. As I'm going through the files, I am adding time-zone data with exiftool.
  • The Panasonic Lumix FT3 did not support the time zone information, but if it recorded GPS position, it has a GPSTimeStamp (in UTC). Since the GPS function reduced battery life and we did some remote travel, we sometimes only switched it on for a few photos in the general area and then disabled it again.
  • None of the compact Nikon E5200, Canon A410 or the old HTC and Nokia phones supported time-zone information.
  • None of the early GoPro (Hero 2, Hero 3) supported time zone information, I have not looked at how the Hero 5 implements it, but it has GPS location for photos.
  • None of the iPhones / iPads support time zone information, but the later ones do have GPSTimeSamps.
  • My current DSLR, the D800E writes the times zone information to the EXIF. If I attach an external GPSLogger, it also writes the GPS location and GPSTimeStamp to the EXIF.
At the moment, my cameras are always (unless I forget) set to the local time when I travel. If I forget to change the time, I correct this before importing into Lightroom. Since I have no way of telling my iPhone and GoPro 5 to set itself to UTC, this is the most consistent way for me to handle this across all cameras.

EDIT: As far as I know, Lightroom does not read or access the time zone of GPSTimeStamp fields.


You can define unique names while export, I don't see the reason to rename to original file.

Unique filenames become really important when you are trying to recover files from backup after a hard drive failure....
 
Joined
Sep 23, 2014
Messages
1,904
Location
Waltham MA
Lightroom Experience
Beginner
Lightroom Version
I like unique names to find the picture again. If someone wants another version or higher resolution I can find it. If they give me a custom exported name, much harder to find.

Tim

Sent from my LG-TP260 using Tapatalk
 
Joined
Jun 20, 2009
Messages
18,997
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
I believe that DSLRs (at least Nikon) records the UTC in the file header. It also records the time zone set by the user. As long as I keep the Time Zone setting in the camera current with location that I am in, I don't have issues with the capture time as it is always UTC +/- a TZ offset. I do trip myself up when DST goes into or out of effect (as it will this weekend) and I forget to change the camera because I haven't change locations.
 

Wernfried

Active Member
Joined
Jan 31, 2017
Messages
161
Lightroom Experience
Intermediate
Lightroom Version
You can use exiftool for that.

In case of having GPS position it is easy, because GPS times are provided in UTC.
Code:
exiftool -o . "-FileName<GPSDateTime" -dateFormat %Y%m%d_%H%M%SZ%%-c.%%e DSC_xxxx.NEF

For the others you have to make in in two steps. First set times to UTC, e.g. -8 hours:
Code:
exiftool "-AllDates-=8" "-OffsetTime=+00:00" "-OffsetTimeDigitized=+00:00" "-OffsetTimeOriginal=+00:00" DSC_xxxx.NEF

Then you can rename it:
Code:
exiftool -o . "-FileName<CreateDate" -dateFormat %Y%m%d_%H%M%SZ%%-c.%%e DSC_xxxx.NEF

Actually "-OffsetTime???=+00:00" are not required, however I recommend to set in order to have an indicator that times have been adjusted.

I also tried to update times dynamically based on "OffsetTime" in case they are available (as the D800E does), something like
Code:
exiftool "-CreateDate<${CreateDate}+${OffsetTime}" "-OffsetTime=+00:00" DSC_xxxx.NEF

but it did not work. I am pretty sure you will get the correct answer at this forum: ExifTool Forum - Index

See also exiftool Application Documentation
 
Joined
Mar 7, 2017
Messages
69
Location
South Carolina, USA
Lightroom Experience
Intermediate
Lightroom Version
@Wernfried,

Thanks for these, I was hoping to avoid having to do this as a multi-step exercise... but renaming is never going to get easier in Lightroom. On the bright side, if I’m going to be doing this with exiftool, I can just as well also use the sub-seconds (I do a lot of burst sequences).


I believe that DSLRs (at least Nikon) records the UTC in the file header. It also records the time zone set by the user

The newer ones do, the old D200 and D80 files didn’t... After the huge amount of pain I caused myself in May when we went back to Aus and I didn’t set the time on all the cameras, it is not a mistake I’m making for at least another year! :eek:

Christelle
 

Wernfried

Active Member
Joined
Jan 31, 2017
Messages
161
Lightroom Experience
Intermediate
Lightroom Version
I ask the question at Exif forum and made some test.

In general first you should check what is in your Exif, here are two examples:

Code:
c:\Temp>exiftool -a -s -G0:1 -Time:All IMGL6934.CR2
[File:System]   FileModifyDate                  : 2017:11:03 06:32:45+01:00
[File:System]   FileAccessDate                  : 2017:11:03 07:43:50+01:00
[File:System]   FileCreateDate                  : 2017:11:03 07:43:50+01:00
[EXIF:IFD0]     ModifyDate                      : 2017:11:03 06:32:44
[EXIF:ExifIFD]  DateTimeOriginal                : 2017:11:03 06:32:44
[EXIF:ExifIFD]  CreateDate                      : 2017:11:03 06:32:44
[MakerNotes:Canon] TimeZone                     : +01:00
[MakerNotes:Canon] TimeZoneCity                 : Paris
[MakerNotes:Canon] DaylightSavings              : Off
[EXIF:ExifIFD]  SubSecTime                      : 82
[EXIF:ExifIFD]  SubSecTimeOriginal              : 82
[EXIF:ExifIFD]  SubSecTimeDigitized             : 82
[Composite]     SubSecCreateDate                : 2017:11:03 06:32:44.82
[Composite]     SubSecDateTimeOriginal          : 2017:11:03 06:32:44.82
[Composite]     SubSecModifyDate                : 2017:11:03 06:32:44.82


c:\Temp>exiftool -a -s -G0:1  -Time:All IMGL1234.jpg
[File:System]   FileModifyDate                  : 2017:11:03 07:56:02+01:00
[File:System]   FileAccessDate                  : 2017:11:03 07:56:02+01:00
[File:System]   FileCreateDate                  : 2017:11:03 07:56:02+01:00
[EXIF:IFD0]     ModifyDate                      : 2017:10:26 22:31:35
[EXIF:ExifIFD]  DateTimeOriginal                : 2017:09:05 16:56:42
[EXIF:ExifIFD]  CreateDate                      : 2017:09:05 16:56:42
[EXIF:ExifIFD]  SubSecTimeOriginal              : 54
[EXIF:ExifIFD]  SubSecTimeDigitized             : 54
[EXIF:GPS]      GPSTimeStamp                    : 14:52:12.033
[EXIF:GPS]      GPSDateStamp                    : 2017:09:05
[IPTC]          DateCreated                     : 2017:09:05
[IPTC]          TimeCreated                     : 16:56:42
[IPTC]          DigitalCreationDate             : 2017:09:05
[IPTC]          DigitalCreationTime             : 16:56:42
[ICC_Profile:ICC-header] ProfileDateTime        : 1998:02:09 06:49:00
[XMP:XMP-xmp]   ModifyDate                      : 2017:10:26 22:31:35+02:00
[XMP:XMP-xmp]   CreateDate                      : 2017:09:05 16:56:42.54
[XMP:XMP-xmp]   MetadataDate                    : 2017:10:26 22:31:35+02:00
[XMP:XMP-photoshop] DateCreated                 : 2017:09:05 16:56:42.54
[XMP:XMP-xmpMM] HistoryWhen                     : 2017:10:26 22:31:35+02:00
[Composite]     DateTimeCreated                 : 2017:09:05 16:56:42
[Composite]     DigitalCreationDateTime         : 2017:09:05 16:56:42
[Composite]     GPSDateTime                     : 2017:09:05 14:52:12.033Z
[Composite]     SubSecCreateDate                : 2017:09:05 16:56:42.54
[Composite]     SubSecDateTimeOriginal          : 2017:09:05 16:56:42.54


Time zone information may be provided by different tags, see this list:

Code:
c:\Downloads\ExifTool>sqlite3 ExifTool.db ".headers on" ".mode column" ".width 25 25 15 15" "select table_name, tag, g0, g1 from v_tags where tag like 'OffsetTime%' or tag like 'TimeZone%' order by 1,
2;"
table_name                 tag                        g0               g1
-------------------------  -------------------------  ---------------  ---------------
Canon::TimeInfo            TimeZone                   MakerNotes       Canon
Canon::TimeInfo            TimeZoneCity               MakerNotes       Canon
CanonRaw::TimeStamp        TimeZoneCode               MakerNotes       CanonRaw
CanonRaw::TimeStamp        TimeZoneInfo               MakerNotes       CanonRaw
DICOM::Main                TimezoneOffsetFromUTC      DICOM            DICOM
Exif::Main                 OffsetTime                 EXIF             ExifIFD
Exif::Main                 OffsetTimeDigitized        EXIF             ExifIFD
Exif::Main                 OffsetTimeOriginal         EXIF             ExifIFD
Exif::Main                 TimeZoneOffset             EXIF             ExifIFD
Nikon::WorldTime           TimeZone                   MakerNotes       Nikon
OpenEXR::Main              TimeZone                   OpenEXR          OpenEXR
QuickTime::MetaData        TimeZone                   QuickTime        QuickTime
Ricoh::ThetaSubdir         TimeZone                   MakerNotes       Ricoh
VCard::Main                TimeZone                   VCard            VCard
VCard::VCalendar           TimeZoneURL                VCard            VCalendar
VCard::VCalendar           TimezoneID                 VCard            VCalendar
VCard::VCalendar           TimezoneName               VCard            VCalendar
VCard::VCalendar           TimezoneOffsetFrom         VCard            VCalendar
VCard::VCalendar           TimezoneOffsetTo           VCard            VCalendar


Setting times to UTC based on available time zone information would be like this. These two examples utilize "Exif::OffsetTime" respective "MakerNotes:TimeZone"

Code:
exiftool "-Exif:AllDates-<${TimeZone;s/^\+// or $_=undef}" "-Exif:AllDates+<${TimeZone;s/^\-// or $_=undef}" -TimeZone=+00:00 -if $TimeZone IMGL6934.CR2

exiftool "-Exif:AllDates-<${OffsetTime;s/^\+// or $_=undef}" "-Exif:AllDates+<${OffsetTime;s/^\-// or $_=undef}" -OffsetTime*=+00:00 -if $OffsetTime IMGL6934.CR2

You should include clause like "-OffsetTime*=+00:00 -if $OffsetTime" in order to prevent shifting the same time multiple times.
 
Status
Not open for further replies.
Top