iPhoto: Setting photo date via Applescript off by an hour on DST switch days
| Originator: | bewebste | ||
| Number: | rdar://13110886 | Date Originated: | 29-Jan-2013 04:04 PM |
| Status: | Open | Resolved: | |
| Product: | iLife | Product Version: | iPhoto 9.4.2 |
| Classification: | Serious Bug | Reproducible: | Always |
29-Jan-2013 04:04 PM Brian Webster: Summary: When using Applescript to set the date of a photo in the iPhoto library, if the date is on a day when daylight savings time is either beginning or ending, the date is incorrectly adjusted by an hour. Steps to Reproduce: Copy and paste the following Applescript into AppleScript Editor and click "Run": set aDate to date "Saturday, January 1, 2000 4:24:05 PM" repeat until aDate > date "Sunday, January 1, 2012 4:24:05 PM" tell application "iPhoto" set date of first photo to aDate set newDate to date of first photo if not aDate = newDate then display dialog "Date mismatch: " & aDate & " vs " & newDate end if end tell set day of aDate to (1 + (day of aDate)) end repeat Expected Results: Setting the photo's date then immediately retrieving it again should always result in the two values being equal, with the "display dialog" command never being hit. Actual Results: On certain days, the values do not match, and a message is displayed in a dialog via the script. When I run the script, I get mismatches on: April 2, 2000 October 29, 2000 April 1, 2001 October 28, 2001 April 7, 2002 October 27, 2002 ... March 11, 2007 November 4, 2007 March 9, 2008 November 2, 2008 ... and so on On the dates in the spring, the times are behind by an hour, and in the fall they are ahead by an hour. Regression: Note that the days are definitely the switch days, since they change from April/October to March/November in 2007, when congress passed legislation to lengthen daylight savings time. Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!