ExifTool Forum

General => Metadata => Topic started by: Simon Truby on April 29, 2012, 07:12:41 PM

Title: Warning: Sec too small msg when trying to update dates
Post by: Simon Truby on April 29, 2012, 07:12:41 PM
Hi

I have a library of photos scanned from hardcopy into TIF files with Vuescan.  I have been trying to update the date fields to make all the time portions unique (I have seen the threads about Filesequence numbers and would attempt this if I could get the basics to work).  However I get the following back:

exiftool -P -overwrite_original -AllDates+="0:0:0 0:05:0" "1956-06-10 142000.tif"
Warning: Sec too small - -4953 < 0 when shifting CreateDate - 1956-06-10 142000.tif
    1 image files updated

However nothing is updated and the problem persists if you try to amend each date field individually.  I'm stumped and have tried this against a JPEG produced from a digital camera and it works fine.... I have tried converting the TIF To a JPEG with Photoshop but the problem persists.  I suspect there is a file compatability issue with the Vuescan generated TIF but cant see what it is.

Hopefully someone can shed some light on this for me.

Simon
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on April 29, 2012, 08:02:33 PM
Hi Simon,

Unfortunately, ExifTool relies on the standard C date/time library functions to do the shifting.  It is on my to-do list to rewrite these in Perl, but until I do this ExifTool is limited to the date range 1970-2034 when shifting date/time values.  Sorry.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 23, 2012, 02:35:14 PM
QuoteIt is on my to-do list to rewrite these in Perl, but until I do this ExifTool is limited to the date range 1970-2034 when shifting date/time values. 

I was very pleased to find the filesequence tag. Then I was disappointed to find the date limitations, since I am mostly working with scans of old photos. Any chance you could bump this up on the todo list?

David Todd
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 23, 2012, 06:15:20 PM
Hi David,

Actually, I was thinking that the 64-bit operating systems may solve this problem for me, so I just tested this here on my Mac (OS X 10.7.4) and in fact the date range restriction is no longer an issue for this C library (and therefore ExifTool as well).  Cool.  Now the question is: what system are you running?

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 23, 2012, 10:43:59 PM
Windows 7/64 bit, unfortunately.  :(
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 24, 2012, 07:13:11 AM
There is a 64-bit version of ActivePerl for Windows.  If you install this version and use the Perl version of ExifTool then this problem may be solved for you too.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 27, 2012, 11:04:05 AM
Quote from: Phil Harvey on August 24, 2012, 07:13:11 AM
There is a 64-bit version of ActivePerl for Windows.  If you install this version and use the Perl version of ExifTool then this problem may be solved for you too.

- Phil

This does work from a command line without the date limitation when using "filesequence". However, I can't get it to work with exiftool gui. I've been trying to work with exiftool_stub, but so far have been unsuccessful. Can you confirm that this can work, and if so, point me to the best available instructions on how to set this up?

David

win 7 /64bit
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 27, 2012, 11:19:57 AM
Hi David,

I'm not 100% sure if the stub must be 64 bit or not, but a 64-bit version is available here (https://exiftool.org/forum/index.php?action=dlattach;topic=3577.0;attach=213).

The install instructions would be:

1) Place the exiftool stub (renamed to "exiftool.exe" if necessary) in your Windows directory ("c:\windows").

2) Put the "exiftool" script and "lib" directory from the full ExifTool distribution in c:\perl\site\bin\

This should now work as long as "perl" is in your path somewhere.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 27, 2012, 05:15:13 PM
Phil,

Most commands are working but date/time statements are not working

In ExiftoolGUI:

-exif:datetimeoriginal="2011:01:01 01:01:01"

or

"-exif:datetimeoriginal=2011:01:01 01:01:01"

produces this error message:

Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl
<-END-

The same thing happens from a command line:

c:\Users\David\Pictures\Sandbox\1975-01>exiftool "-exif:datetimeoriginal=2011:01 :01 01:01:01" *
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD
:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 27, 2012, 06:38:16 PM
Hi David,

There is something funny going on.  What does typing "exiftool -ver" at the command line return?

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 28, 2012, 09:39:10 AM
9.01

Unless there is something you think I should try with my current setup, I think I should try a fresh re-install of exiftool and related components (exiftoolGUI, the stub). I've been evaluating many metadata tools based on exiftool and parts of them are scattered in a variety of places (and with different versions). I need to clean that up, check my path carefully, and make sure I'm running a good installation. It may take me a couple of days to get to this, but I'll post the results as soon as I have done it.

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 28, 2012, 10:56:34 AM
Hi David,

Sounds good.  As part of the clean-up, delete all ExifTool temporary files so they get regenerated.   The location of the temporary directory depends on the value of the TEMP environment variable (typically "C:\Users\USER\AppData\Local\Temp\par-USER" for Windows 7).

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 29, 2012, 10:29:40 AM
Phil,

I cleared out my various exiftool installations and reinstalled the perl version and the stub. I still have the same problem when I use the stub:

c:\Windows>exiftool -exif:datetimeoriginal="1977:07:07 00:00:01" c:\Users\David\
Pictures\Sandbox\1975-01\
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD
:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl

The installation works correctly when I use the perl script directly:

C:\Perl\site\bin>perl exiftool -exif:datetimeoriginal="1977:07:07 00:00:01" c:\Users\David\Pictures\Sandbox\1975-01\
    1 directories scanned
    2 image files updated

The problem seems to be with the stub. The stub works correctly for everything I've tried except date/time values. Quoted tags using redirection work fine.

I tried both the 64-bit and 32-bit stubs--no difference.

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on August 29, 2012, 11:17:10 AM
Phil,

Another clue consistent with the hypothesis that the problem is with the stub handling the space character:

C:\Users\David\Pictures\Sandbox\1975-01>exiftool "SF Slides 20081230-11.tif"
File not found: SF
File not found: Slides
File not found: 20081230-11.tif
    0 image files read
    3 files could not be read
Error executing perl

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on August 30, 2012, 07:27:57 AM
Hi David,

OK.  It seems like the stub messes with the quoting of arguments.  I'll have to look into this.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on September 12, 2012, 09:31:01 AM
Phil,

I'm at a point where I need this fix. Any chance you could take a look at it soon?

Thanks.

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on September 12, 2012, 10:09:25 AM
Hi David,

Thanks for the reminder.

OK, I guess I have to fire up the Windows box and run some tests.  :(

I just looked at the code for the stub, and it looks like it should handle quoting properly, so I'm a bit surprised that you are having this problem.  However, I'll test it out (maybe tonight) and see what happens.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on September 12, 2012, 02:51:11 PM
Thanks. I think the problem might be specific to the space character. Other characters that need to be quoted, such as the redirection character, don't have a problem.

Edit:

I've added support for this notion by re-reading your FAQ on dates, and trying the following:

-datetimeoriginal=19660101000000

It works fine.

Similarly, the following command works to sequence files dated before 1970 as long as I don't include the year with the necessary space before the h:m:s string:

-exif:datetimeoriginal+<"00:00:$filesequence"

Realizing this actually gives me workaround until we figure out the problem I'm having with spaces and the stub.

Second Edit:

NOTE: I'm using these tags in exiftool GUI, which somehow seems to handle the spaces in the filenames with the stub. When I use these tags in a command line with the stub, I still get the errors from spaces in paths or filenames.

David
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: Phil Harvey on September 12, 2012, 06:42:48 PM
Hi David,

I finally fired up the PC and did some testing... I could reproduce the problem, and I've patched the stub and uploaded a new version.

See this post (https://exiftool.org/forum/index.php/topic,3577.msg16282.html#msg16282) for the new version.

Thanks for reporting this.  Sorry about the delay in getting this fixed.

- Phil
Title: Re: Warning: Sec too small msg when trying to update dates
Post by: dmtoddma on September 13, 2012, 08:39:53 AM
Phil,

Excellent! Thanks very much.

David