Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Plugins
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.7.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by timotheus - 2010-12-19
Last edited by bertrik - 2012-04-12

FS#11814 - calendar.rock day of week is off-by-one

The calendar.rock application displays the day of week for year 2010 off-by-one. On my player (iPod Video 30GB), the calendar application shows date 2010-12-19 as Monday when it is actually Sunday.

Closed by  bertrik
2012-04-12 19:44
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Should be fixed by 449dff4

I think that this can either be a bug in the RTC driver for the ipod video (the PCF50605) or in the calendar plugin.

Does this still happen when you update the time (e.g. change it back and forth by an hour)?

St. commented on 2010-12-20 08:32

It’s present on My Nanos and Colours, and Time and Date reports the correct time/date…so I guess it is a problem with the plugin.
Except it’s off by two days here.
The date is displayed correctly, just not the day.

[St.]

Confirming, except on my Ipod Nano 2nd gen it’s actually off by two days. (Says Wednesday instead of Friday even though the date is correct). I would suggest a slight elevation in priority since many people (including some one I know) use the calendar for work purposes.

nls commented on 2011-01-08 19:33

the date and weekday is correct and matches between time & date and the calendar on my h300 and fuze and in a beast sim so i’d guess it’s a target specific problem or something weird

Works fine on my sansa c200, e200, clipv1, clip+ which all use the as3514 rtc driver.

The ipod video, nano 1g (assuming Hayden was referring to the 1g …), the color all use the pcf50605 rtc driver.
It’s not entirely clear what rtc driver the nano2g uses (”RTC_NANO2G”, great), but it seems to be a pcf5063x.
So indeed it seems there is some bug in the pcf506.. family of rtc drivers.

Does this still happen when you update the time (e.g. change it back and forth by an hour)?

Messed around with it a bit and found the ‘magic fix’. Since I dabbled a bit I can’t swear this to be 100% accurate.
1. Enable Daylight savings time on original firmware.
2. Reboot to Rockbox
3. Move clock back one hour since it is ahead one hour too much.
3. Go to Calendar and the dates days were displayed correctly. (e.g. Thursday the 13th)

It defiantly has some sort of correlation with the clock.

@gaming4jc

I tried your solution. My daylight savings time was off, so I turned it on, adjusted the clock, and now my clock is adjusted for that. However, I get the same calendar behavior as before: the day of the week is one day ahead of what it should be.

I looked a bit deeper into this including forcing an incorrect weekday in a simulator, my conclusions:
* the weekday is independently stored in the RTC chip of the PCF50605, so it is indeed possible to get a weekday that is off but have an otherwise correct date
* even if the weekday is off in the RTC, the time&date screen shows the correct weekday (because it is recalculated in this screen)
* when setting the time in the time&date screen, a corrected weekday is set in the RTC

So, changing the time&date should fix the weekday setting (even if you don’t actually change the date). Has anyone tried that? (PLEASE DO!)
Perhaps the OF has a different idea about how the weekday should be coded.

Just have checked this on my iPod Video 60 GB. It works.
Thanks!

Perhaps a more permanent solution is to ignore the week-of-day value in the RTC and always recalculate it ourselves (we already have the function to do this), unless this gives some conflict with the original firmware.
I think this needs to be discussed with some other rockbox developers first (like the person who wrote the pcf50605 RTC driver).

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing