Khronos Date/Time show up in us-format - how to change that

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Hi,

i am preparing to use Khronos on one site.

Now i see in the week or day view that Date/Time is with am/pm and dates with the month first.
Is there a way to make Khronos show german dates/times?

I looked through the helptexts and with CMSMSExt but could not find anything.

Thanks in advance,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Khronos Date/Time show up in us-format - how to change that

Post by velden »

I'd expect this to be formatted in the templates.
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Hi Velden,

thanks for reacting.

Since the fullcalender-template is bases on fullcalender.io this must be set within the javascrips of fullcalendar as far as i can see.

There is a locale-file for german that is "modules/Khronos/lib/fullcalendar/lang/de.js" i just do not know where and how to transfer to fullcalendar to use the german language-script for the backend.

I could not find a setting within CMSMS-Khronos.

Regards,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Khronos Date/Time show up in us-format - how to change that

Post by velden »

Yeah I see it's a little messy.

de.js doesn't seem compatible with the version of fullcalendar.io used.
You can fix this by replacing to functions in this file:

a.fullCalendar.datepickerLang --> a.fullCalendar.datepickerLocale
a.fullCalendar.lang --> a.fullCalendar.locale

Then in your Khronos template:

Code: Select all

{xtjs_require cssfile='lib/fullcalendar/fullcalendar.min.css'}
{xtjs_require jsfile='lib/fullcalendar/lib/moment.min.js'}
{xtjs_require jsfile='lib/fullcalendar/fullcalendar.js'}
{xtjs_require jsfile='lib/fullcalendar/lang/de.js'} // <-- ADD THIS LINE
{xtjs_add nominify=1}

Code: Select all

    // monthNames: dateStrings.monthNames,
    // monthNamesShort: dateStrings.monthNamesShort, // <-- COMMENT THIS LINE
    // dayNames: dateStrings.dayNames, // <-- COMMENT THIS LINE
    // dayNamesShort: dateStrings.dayNamesShort, // <-- COMMENT THIS LINE
     firstDay: {$firstdayofweek},
     locale: 'de', // <-- ADD THIS LINE
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Thanks Velden,

i will make the changes.

Regards,
Jan
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

OK, I made the changes and there is more german now, so that is working.

My point, the time-format in the bachground is still like 4.00 am and 4.00 pm where 04.00 and 16.00 would be more international.
I have no idea where to change that for the weekview or dayview in the full calendar. I did look in the template.

A setting like that would be helpfull, should i make a request for this feature?

Regards,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Khronos Date/Time show up in us-format - how to change that

Post by velden »

I can't confirm the time format you see (in my case it's HH:mm)
That's also the format server by Khronos in the XHR request (checked using the browser's Dev Tools). It's possible you're server is configured differently or your CMSMS global settings are different.

I don't agree with the 'more international' statement btw. That said, in our region it's common to use the 24h clock format.

fullcalendar.io is well documented. It IS possible to change the date and time formats: https://fullcalendar.io/docs/date-formatting
But again, in my case the time is displayed in 24h clock format and I haven't changed a Khronos setting for that.
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Thanks Velden for the hints.

I will look at the rootserver, i installed minimal ubuntu 22.04 on it and the german locales, afterward ISPConfig, but i will check that.

According to some stackoverflow-entry i should change json.php but could not find it in the Khronos-files

So i will search further.

Regards,
Jan
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Hi Velden,

i checked the server etc.

Server Locale is
LANG=de_DE.UTF8
LC_TIME="de_DE.UTF-8"
the same is shown in CMSMS

I (still) run PHP 7.4

Any ideas?

Another question, i have sites with an older config.php where for example $config['permissive_smarty'] = true;
is given, in the documentation is says $config['permissive_smarty'] = 1;
Do i have to change that?

Regards,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Khronos Date/Time show up in us-format - how to change that

Post by velden »

Sorry, I'm out of ideas.

You can use the information I posted before. Fullcalendar.io is very flexible but some js skills are needed.
I think it's not the responsibility of the module (Khronos) to take care of display formats.

That said, I don't use the module(s) myself.
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Thank you Velden,

i will search further, i will find it one day ;-)

Regards,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Khronos Date/Time show up in us-format - how to change that

Post by velden »

BTW: did you check the XHR responses which are returned by the module?
There you can see what format the module itself returns.
ss_khronos_01.png
janvl
Power Poster
Power Poster
Posts: 967
Joined: Wed Aug 13, 2008 10:57 am

Re: Khronos Date/Time show up in us-format - how to change that

Post by janvl »

Thanks Velden,

with what tool/script did you generate this output, i am no developer.

Regards,
Jan
Post Reply

Return to “Modules/Add-Ons”