Hide
Recording something with EyeTV does not work if done on a day that does not exist one month later. The recording is one month off then.
For example:
Today is August 31. There will be no September 31, since september only has 30 days.
Every recording I program today is set to one month later in EyeTV, no matter on which day it occurs.
You can see the bug only on that special days. Trying tomorrow will NOT show the problem. The next day the bug will occur is October 31, since there is no November 31.
Reason:
Say the current date is today, (2010 , 8 , 31). The generated AppleScript contains this commands:
set myDate to current date
tell theISODate
set year of myDate to item 1
set month of myDate to item (item 2) of monthConstants
set day of myDate to item 3
end tell
myDate is set to (2010, 8 ,31).
When the month is set, for for a short time the date object contains a value of (2010 , 9 , 31) which is an illegal day. The system „repairs" that to (2010 , 10 , anything).
One line after the day is set to 1. This leads to (2010 , 10 ,1) instead of (2010 , 9 , 1).
Solution:
I don´t understand why „current day" is used at all, since every part of this date object is overwritten immediately. It looks like „Hey, I need to generate /any/ date object as fast as possible" to me.
I used that code successfully:
Replace:
set myDate to current date
by:
set myDate to date "1.1.1970 00:00:00"
Since January has 31 days, the problem will never occur. That fixed it for me.
Further problems:
'grep'ing the sources for the right file I can see similar bugs at least in „thetubedriver" and „AppleiCalExporter", however, I did not look further in there. But the wrong code seems to be there, too.
Show
Recording something with EyeTV does not work if done on a day that does not exist one month later. The recording is one month off then.
For example:
Today is August 31. There will be no September 31, since september only has 30 days.
Every recording I program today is set to one month later in EyeTV, no matter on which day it occurs.
You can see the bug only on that special days. Trying tomorrow will NOT show the problem. The next day the bug will occur is October 31, since there is no November 31.
Reason:
Say the current date is today, (2010 , 8 , 31). The generated AppleScript contains this commands:
set myDate to current date
tell theISODate
set year of myDate to item 1
set month of myDate to item (item 2) of monthConstants
set day of myDate to item 3
end tell
myDate is set to (2010, 8 ,31).
When the month is set, for for a short time the date object contains a value of (2010 , 9 , 31) which is an illegal day. The system „repairs" that to (2010 , 10 , anything).
One line after the day is set to 1. This leads to (2010 , 10 ,1) instead of (2010 , 9 , 1).
Solution:
I don´t understand why „current day" is used at all, since every part of this date object is overwritten immediately. It looks like „Hey, I need to generate /any/ date object as fast as possible" to me.
I used that code successfully:
Replace:
set myDate to current date
by:
set myDate to date "1.1.1970 00:00:00"
Since January has 31 days, the problem will never occur. That fixed it for me.
Further problems:
'grep'ing the sources for the right file I can see similar bugs at least in „thetubedriver" and „AppleiCalExporter", however, I did not look further in there. But the wrong code seems to be there, too.