Recent Topics

1 Mar 30, 2008 08:06    

I have only just found b2evol and installed 2.4.1

I went to change some regional settings etc.

Weird thing has happened:

I'm using only the English (GB ) option and changed the start of the week from Mon to Sun and now March doesn't have enough days :lol:

I can change it back to Mon and its fine, I haven't tried other days yet :)

But it goes further than that each year gets worse see image below:
As far as I can tell or other months are fine between 2007 and 2009.

http://www.rogerlovejoy.info/opensource/b2evolution/images/evol-cal1.png

Sure for now I will have to start the week like the capitalists, not that I'm religious, but weeks start on a Sunday for me. I'm 60 years old fashioned.

Help me get my lots days back please, I don't have that many to throw away. :(

Note above: Can't follow a 'B' with a ')', there has t be a space between them or you get B)

2 Mar 30, 2008 08:18

Well to follow up, I have now tried starting the week with all the other days and its fine.

Ah! English (UK) works ok, well for March anyway, so I'll use that for now, but I would like the GB fixed :?:

EDIT 1 Ooops! too quick there, I've been up all night. The UK doesn't work at all even though it is selected as the default.

I have two locales enabled the GB and UK English.

I just saw the 31st and thought it was working, I didn't notice in my hurry that the default hadn't changed and the week still started on a Monday. Oh well!

EDIT 2 REMOVED URL
EDIT 3 I have removed the GB locale and the UK does the same, so I was wrong again. I just thought the default hadn't changed as the Calendar was the same

3 Mar 30, 2008 11:48

Ok Still haven't solved it yet, but I'm looking at the file [ _calendar.plugin.php ] and will post an update later -tomorrow or later.

As I've had no response yet and want to get on and use the blog I'm going to have start the week on anything but Sunday. So Monday it is.

I'm therefore removing the link in my earlier post as it won't show the problem.

Back soon

Amoun

5 Mar 30, 2008 15:31

Thanks Afwas. Are you using 2.4.1 and the English Uk or Gb locale? Just checking.

I've just put my site back the quirky mode so you can have a look :)

From the html source

<tr class="bCalendarRow">
<td class="bCalendarCell">23</td>

<td class="bCalendarCell">24</td>
<td class="bCalendarCell">25</td>
<td class="bCalendarCell">26</td>
<td class="bCalendarCell">27</td>
<td class="bCalendarCell">28</td>
<td class="bCalendarCell">29</td>
</tr>
</table>

It's clear the widget doesn't make enough rows.

I will be looking at [ _calendar.plugin.php ] that it doesn't make enough rows in the table, but I haven't time to look into it for a while.

In fact if you have the file maybe you could post it somewhere, maybe mine is corrupt?

Thanks : Later

6 Mar 30, 2008 16:50

This is a bug that only happens when there is a daylight savings time change on the first day on the week.

Here is a fix. File /inc/_core/_misc.funcs.php around line 537, replace the function with this one:


/**
 * Get start and end day of a week, based on day f the week and start-of-week
 *
 * Used by Calendar
 *
 * @param date
 * @param integer 0 for Sunday, 1 for Monday
 */
function get_weekstartend( $date, $startOfWeek )
{
	while( date('w', $date) <> $startOfWeek )
	{
		// mktime is needed so calculations work for DST enabling. Example: March 30th 2008, start of week 0 sunday
		$date = mktime( 0, 0, 0, date('m',$date), date('d',$date)-1, date('Y',$date) );
	}
	$week['start'] = $date;
	$week['end']   = $date + 604800; // 7 days

	return( $week );
}

This will be included in future releases.

7 Mar 30, 2008 17:13

Please note DST started on march 30th in Europe but it started much earlier in the US. So you will actually only notice this bug if your server is located in or configured for an european timezone.

I don't know for the other continents, but please let us know if you had this bug and when you entered summer time in your country.

8 Mar 30, 2008 17:39

Ah I'm using summer time as of today 1am this morning in the UK. It is now 16:35 UK time.

But it affects the March's in other years. ???

Will try that code

Thanks fplanque

9 Mar 30, 2008 17:48

Excellente fplanque mon ami.

Changed the code as shown and it works fine :cookie:

10 Mar 31, 2008 12:27

I noticed the same bug a couple of minutes ago, that's why I found this thread. My server is located in Germany, yesterday time changed to summertime.

I fixed the bug by replacing the appropriate part of the php script as well as by letting the week start with Monday. I didn't notice that the default was set on Sunday, because to most people in Europe this is quite unusual. (Although our Wednesday is called "Mittwoch", which means "Middle of the Week", and I have to admit that according to this our week should start on Sunday. But what the heck! To nature all days are the same, only we give them different names. ;) )

11 Apr 01, 2008 01:55

Hi Chris.
Its nice to see someone having the same or similar issue. However its not the name of the week that matters,as you say, but that whatever is used to denote them. The first day is the day after the last day. From the Sun to Saturn.

Allthough not quite the same

"All movement is accomplished in six stages, and the seventh brings return.
Seven is the number of the young light, it form when darkness is increased by one. Change, return, success, coming and going without error, action brings good fortune" some say. (Sunset, Sunrise) Gooden Tag

12 Apr 09, 2008 01:41

Chris, if you just set your blog to de-DE as your locale, your weeks will start on monday as it is the norm for Germany.

13 Apr 21, 2008 19:52

Figured this was as good a place as any to ask about the calendar setting - how can I get my calendar widget to start with Sunday instead of Monday? I see from the pics above that it can start with Sunday, but I haven't been able to find that setting...?? Thanks!

14 Apr 22, 2008 00:03

Under Global Settings > Regional

:)

15 Apr 22, 2008 01:52

THANK YOU! THANK YOU! THANK YOU! I swear I looked everywhere but the obvious!! :)


Form is loading...