News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

The calendar days do not match with the days of the week, please help

Started by Mikce, January 07, 2019, 10:46:16 PM

Previous topic - Next topic

Mikce

Hello, guys!

I discovered that the calendar days do not match with the days of the week (one weekday ahead). :'(
My forum is in Lithuanian language, I guess the problem is where the weeks first-day settings. Because if it were in English and a week starts from Sunday everything would be ok.

Please help, what should I change to display the calendar correctly?

Thanks in advance! ;)

My forum calendar: http: hxxp:spekuliantas.com/forum/index.php?action=calendar [nonactive]



br360

In your admin panel, go to Admin > Themes and Layout > Member Options

Look for "First day of the week on the calendar" and change that to whatever day you want to set it to.

Make sure to make the change in both:

Configure guest and new user options for this theme
Change current options for all members using this theme

Mikce

Sir,

I did so, changed from Monday to Sunday, unfortunately, only a day of the week moves, but also with a calendar day, and is still displayed incorrectly: January 8th - Wednesday...



:'(

Aleksi "Lex" Kilpinen

I'd guess your timezone is probably set wrong, so assuming you want the forum to be in your own timezone:

First, check that your Profile -> Modify profile -> Look and Layout -> Time Offset is set to zero.

Then go to Admin -> Configuration -> Features and Options, and use Server Timezone (and/or overall time offset if needed) to fix the forum to be in the correct time for you.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Mikce

Sir,

The timezone is correct (Europe/Vilnius), offset is 0, I checked as You advised. The is no problem with time.
The problem is that the day of the week goes forward: January 8th - Wednesday.

shawnb61


My first guess is that the weekday $txt entries in index.{language}.php are incorrect...

I believe the $txt entries for $txt['days'] and $txt['days_short'] need to go from Sunday to Saturday there.  If they start on something other than Sunday, I think the math will be wrong...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Aleksi "Lex" Kilpinen

That's a possibility ( I tried to look this up, but currently our Lithuanian package seems to be broken )

Anyhow, in index.*language*.php there are 2 strings


$txt['days'] = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
$txt['days_short'] = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');


That should be translated in the same order - can you verify if that is the case, or do they start on a wrong day?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Mikce

Wow, Sir, It works!!!!! :D

I Just put Sunday first in a the row:
$txt['days'] = array( 'Sekmadienis','Pirmadienis', 'Antradienis', 'Trečiadienis', 'Ketvirtadienis', 'Penktadienis', 'Šeštadienis');
$txt['days_short'] = array( 'S','Pr', 'A', 'T', 'K', 'Pn', 'Š');

Sir, my most profound THANKS!!!!!! :)


Aleksi "Lex" Kilpinen

Just a note, you really should update. 2.0.6 is multiple versions behind.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF


Arantor


Advertisement: