Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: David Marsh on March 07, 2007, 12:03:16 PM

Title: %cac returns wrong day of the week
Post by: David Marsh on March 07, 2007, 12:03:16 PM
I was round my mother's this afternoon, and showed her rockbox running on my iPod Video.  She quickly noted that the day of the week displayed was wrong. Much to my disappointment she was right.  I don't know why I didn't spot it before.

I checked the system date/time setting and it correctly shows today (Wed) but in the 'Now Playing' screen it shows "Thu".  Is this a bug?

The actual date format string I am using is:
Code: [Select]
%ca e b,H:Mc
I tried the other day of the week format codes:
Quote
From: http://www.rockbox.org/twiki/bin/view/Main/CustomWPS
u     day of week (1..7); 1 is Monday
w    day of week (0..6); 0 is Sunday
u returns 5 and w returns 4, so w is right but u is wrong also.

I couldn't find any other refs in the forums to this issue.  Does anyone else get this too?
Title: Re: %cac returns wrong day of the week
Post by: ice-m on May 09, 2007, 07:22:34 PM
I've got the same problem in my iRiver h-10 20 GB. In the 'Now playing' screen there is for example Sat and actual day is Thursday. Does anyone know how to fix that?
Title: Re: %cac returns wrong day of the week
Post by: robin0800 on May 10, 2007, 03:32:38 PM
The Real Time Clock Format Has Changed

See http://www.rockbox.org/twiki/bin/view/Main/CustomWPS#Real_Time_Clock

Real Time Clock
Tags allowing to add a clock to your WPS. They will be empty if the time isn't set correctly.
Tag  Description  
%cd  day of month (01..31)  
%ce  day of month, blank padded ( 1..31)  
%cH  hour (00..23)  
%ck  hour (0..23)  
%cI  hour (01..12)  
%cl  hour (1..12)  
%cm  month (01..12)  
%cM  minute (00..59)  
%cS  second (00..60)  
%cy  last two digits of year (00..99)  
%cY  year (1970...)  
%cP  upper case AM or PM indicator  
%cp  lower case am or pm indicator  
%ca  abbreviated weekday name (Sun..Sat)  
%cb  abbreviated month name (Jan..Dec)  
%cu  day of week (1..7); 1 is Monday  
%cw  day of week (0..6); 0 is Sunday  


For example, I use: %ca, %cb %cd, %cH:%cM:%cS.

This displays, assuming it's January 1st, a Sunday, at 04:10 and 42 seconds: Sun, Jan 01, 04:10:42.

so check the theme to see if its been updated.

Title: Re: %cac returns wrong day of the week
Post by: shoe on May 11, 2007, 08:31:30 PM
I have this problem too (Ipod 4g).  The %ca displays the wrong day of the week.  If I go to the settings menu, to set the date and time, the correct day of the week is displayed there.  Must be a bug.
Title: Re: %cac returns wrong day of the week
Post by: robin0800 on May 12, 2007, 11:41:06 AM
Just for info it works OK on an ipod 5G 60Gb

I use %ar%ca.%ce %cb. %cl:%cM %cp

And Displays Sat.12 May. 4:40 pm
Title: Re: %cac returns wrong day of the week
Post by: NicolasP on May 15, 2007, 11:17:55 AM
shoe, are you using the new syntax for the RTC, like robin explained ? If so, I'll need more details in order to be able to fix the bug because I can't reproduce it.
Title: Re: %cac returns wrong day of the week
Post by: shoe on May 15, 2007, 04:29:15 PM
Yes I am, the line I am using in my WPS is:

  %al%ca, %cb %cd %ar%cl:%cM%cp

Today (Tuesday) it prints out

  Sun, May 15          1:28pm

If I go to General Settings->System->Time & Date->Set Time/Date, it shows the correct correct time and day:

  13:28:52
  Tue 2007 May 15

If you would like additional info, I'd be glad to provide it.
Title: Re: %cac returns wrong day of the week
Post by: shoe on May 17, 2007, 08:23:19 PM
Update: Today is Thursday, my RB WPS says its Tuesday.  Since the Day of the week is always 2 days behind, I thought I would set the year to 2008, making the day of the week Saturday, then if the WPS is 2 days behind, it would display Thursday, and the weekday and day of the month would both be correct.  

When I made the change though, the WPS said Saturday.  I then changed it back to 2007, and the WPS now says the correct day!  I don't know why, but it seems to be fixed.  I'll mention this on the bug request as well.