iOSMessageExport icon indicating copy to clipboard operation
iOSMessageExport copied to clipboard

After iOS 11, "gmtime too large/failed" and "use of unintended value" errors

Open cadmiumores opened this issue 8 years ago • 4 comments

I assume this is due to the latest iOS update, but I tried processing my latest iPhone backup and got the texts in the HTML files but not separated by date. Every text is labeled as having been sent/recieved on "Sunday, December 31st, 1899" at "08:07:12" and I got a bunch of errors in the Terminal -- about 40 sets of the following, the exact same save the 18-digit number in the parenthesis:

gmtime(523199542978307200) too large at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 529. gmtime(523199542978307200) failed at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 529. Use of uninitialized value in subroutine entry at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 238. Use of uninitialized value in subroutine entry at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 240. Use of uninitialized value in subroutine entry at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 240. Use of uninitialized value in subroutine entry at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 240. Use of uninitialized value $second in numeric lt (<) at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 337. Use of uninitialized value $second in numeric eq (==) at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 343. Use of uninitialized value $p{"second"} in numeric gt (>) at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/DateTime.pm line 267.

cadmiumores avatar Nov 05 '17 16:11 cadmiumores

Hello

just arrived on this project ... Since IOS11, it seems we have do use date/1000000000 instead date.

BR Ron

ron-fr avatar Nov 27 '17 14:11 ron-fr

(edited out my own unhelpful confusion; figured things out now lol) thanks!!

cadmiumores avatar Dec 03 '17 05:12 cadmiumores

@ron-fr I'm glad there's a solution, but how and where do I go about doing this division?

spencercap avatar May 03 '18 06:05 spencercap

ah, solved my own problem... just threw in that division everyone date comes up in the iOSMessages.pm file (specifically lines 67–78) like so:

            CASE 
                WHEN date > 0 then TIME(date/1000000000 + 978307200, 'unixepoch', 'localtime')
                ELSE NULL
            END as Time,
            CASE 
                WHEN date > 0 THEN strftime('%Y%m%d', date/1000000000 + 978307200, 'unixepoch', 'localtime')
                ELSE NULL
            END as Date, 
            CASE 
                WHEN date > 0 THEN date/1000000000 + 978307200
                ELSE NULL
            END as Epoch, 

spencercap avatar May 03 '18 06:05 spencercap