Bug 389835 - Incorrect DateTime manipulation if timestamp is before unix epoch time
Summary: Incorrect DateTime manipulation if timestamp is before unix epoch time
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-TimeAdjust (other bugs)
Version First Reported In: 5.5.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-03 16:36 UTC by antonio
Modified: 2018-02-03 22:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description antonio 2018-02-03 16:36:48 UTC
I apologize in advance for my bad and poor English but this is what I can write
The problem appears when I want to change the modification date&time of images using BatchQueueManager.  
Example: 
Property of my image  Date:02/02/18 10:26 as last modified time stamp 
I would like to change all time stamps (EXIF, IPTC,XMP and File last modified) to 03 February 1965 00:00:01; the result is:
In file property Date:07/02/06 07:28 as last modifed timestamp
In all other Metadata (EXIF etc) Date and Time 1965:02:03 00:00:01
If I read stat data of image from command line: stat image.jpg I obtain:

Modifica : 2106-02-07 07:28:15.000000000 +0100 (modified timestamp)

If I use command 'touch -m -d "Feb 03 1965 00:00:01" image.jpg I get from stat:
 Modifica : 1965-02-03 00:00:01.000000000 +0100(modified timestamp)
Now the Digikam file property shows Date: 12/03/01 06:28
Please note that if I use  timestamp after unix epoch there are no problems.
If you need more info please tell me; i'll do my best to help you to find this strange bug.
Best regards Antonio
Comment 1 antonio 2018-02-03 16:44:03 UTC
I forgot to supply some info about my system:
AMD Phenom 8650 
RAM 8 GB

Linux Amd64-14 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Best regards
Comment 2 Maik Qualmann 2018-02-03 20:18:29 UTC
Git commit c610757916a719ca210743ae15511034f4e7647f by Maik Qualmann.
Committed on 03/02/2018 at 20:16.
Pushed by mqualmann into branch 'master'.

fix file modification timestamp before unix epoch time
FIXED-IN: 5.9.0

M  +2    -1    NEWS
M  +11   -1    utilities/queuemanager/tools/metadata/timeadjust.cpp

https://commits.kde.org/digikam/c610757916a719ca210743ae15511034f4e7647f
Comment 3 Maik Qualmann 2018-02-03 20:50:32 UTC
Note: the minimum date must now be greater than December 13, 1901.

Maik
Comment 4 antonio 2018-02-03 22:30:53 UTC
(In reply to Maik Qualmann from comment #2)
> Git commit c610757916a719ca210743ae15511034f4e7647f by Maik Qualmann.
> Committed on 03/02/2018 at 20:16.
> Pushed by mqualmann into branch 'master'.
> 
> fix file modification timestamp before unix epoch time
> FIXED-IN: 5.9.0
> 
> M  +2    -1    NEWS
> M  +11   -1    utilities/queuemanager/tools/metadata/timeadjust.cpp
> 
> https://commits.kde.org/digikam/c610757916a719ca210743ae15511034f4e7647f

Thank You for your support. I'll wait version 5.9