Make a donation to help WiPhA development



Connect again

Your name (or pseudo) :

Your secret code (associated with your pseudo)

 Count of members 44 members

Connected :


 328635 visitors

 13 visitors online

forum.gifForum - Web iPhoto Access - Topic #191

Forum - Forum
Web iPhoto Access - Web iPhoto Access
- Topic # 191

active Topic # 191  date/time calculations in iphotoparser.php

02/05/2007 @ 23:06
by Jeroen



1st: I think WiPhA is great!

I noticed something strange: for photo's after 2007-02-28 the date shown below the photo was 1 day earlier than that in iPhoto/EXIF. Guess it's got something to do with the way iPhoto and PHP handle date/timestamps.

I found some sort of solution myself. I changed the following code in iphotoparser.php, in function timerIntervalToTimestamp:

$d = getdate(intval($appleTimerInterval));
return mktime($d['hours'],$d['minutes'],$d['seconds'], $d['mon'],$d['mday'],$d['year']+31, 0);


return intval($appleTimerInterval)+978307200;

(978303600 is the unix timestamp voor 2001-01-01 00:00 on my system, and I added 3600 seconds to because this gave the expected results - don't ask why...)

I don't know if the above is of any use to others, or if it is worth using in the distributed code. Maybe it is.
  Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
Forum Topic  Forum 

^ Top ^