×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me

TOPIC: 12 Hour view in Calendar not showing.

12 Hour view in Calendar not showing. 10 years 2 months ago #25140

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Chris,

did not forget you - still working on a solution :)

The subtraction somestimes goes wrong, because the utc hours are negative with GMT -7 :dry:

You can just return an empty string return "";

Best regards

Yves

12 Hour view in Calendar not showing. 10 years 2 months ago #25141

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
Thank you. I appreciate your efforts and will wait for your solution.

You will have to guide me, where can I ( just return an empty string return ""; ) ?

Thanks so much,

[Edit] I found where I needed to return an empty string. For now I have the time removed from the calendar, but will still be waiting for your solution. - Thank you.

12 Hour view in Calendar not showing. 10 years 2 months ago #25156

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
Have you found a solution yet?

Thanks,

12 Hour view in Calendar not showing. 10 years 2 months ago #25159

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Sorry not yet, it has something to do with the timezone - very wired issue. I will inform you when i have a working solution.

Best regards

Yves

12 Hour view in Calendar not showing. 10 years 2 months ago #25188

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
For a quick fix, how can I disable the time calculation of the different time zones? It will always be United States Mountain Standard Time (MST) and nothing else. It does not need to calculate time from GMT.

Thoughts?

12 Hour view in Calendar not showing. 10 years 2 months ago #25192

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Chris,

it's not the calculation of timezones causing this issue - The problem is that JavaScript is messing around with it too (e.g. it gets 12 pm and makes it 21 am etc.). I have it very high on my todo-list and keep you updated.

Best regards

Yves

12 Hour view in Calendar not showing. 10 years 2 months ago #25247

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
Greetings. We are going live with site in few days and need this fix working. How is it that you are coming with progress?

I anxiously wait for resolve.

12 Hour view in Calendar not showing. 10 years 2 months ago #25249

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Still on my TODO-list for 3.1 - hopefully i get it working this weekend.

Yves

12 Hour view in Calendar not showing. 10 years 2 months ago #25277

  • Fayez Maarrawi
  • Fayez Maarrawi's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hi Chris and Yves,

I had the very same issue as I'm based in Dubai (GMT+4) and all my events scheduled on or after 20:00 were displayed next day (that's probably 20 + 4 = 24, throwing them to next day)

After using the code on PasteBin I had the same issue as of Chris: All PM events disapeared.

However, after playing around the function and trying several scenarios, I got it to run perfectly :)

Here's the revised code... Hope it works for you Chris in time for your launch ;)
function thTime(timeFormat, timeTwelveHourFormat){
		    // twelve hour time
            timeTwelveHourFormat = new Boolean(timeTwelveHourFormat);
 
            if (timeTwelveHourFormat == true) {
                var hours = this.getUTCHours();
                var htext = (hours == 0 ? 12 : hours); // 0h is actually 12am
                htext = htext < 13 ? htext : htext - 12; // switch to 12hr time display
 
                var minutes = this.getUTCMinutes();
 
                if (minutes < 10){
                    minutes = "0" + minutes ;
                }
                this.setUTCHours(hours-12);
 
                var ampm = this.format('%p').toLowerCase();
 
                return (htext + ":" + minutes + ampm)
            } else {
                var minutes = this.getUTCMinutes();
 
                if (minutes < 10){
                    minutes = "0" + minutes ;
                }
 
                return (this.getUTCHours() + ":" + minutes);
            }
		}

12 Hour view in Calendar not showing. 10 years 2 months ago #25278

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0

Thank you for the reply. This is the closest I've seen it. After updating to this function, I am off exactly 12 hours.

If I book an event at 18:00, it shows 6:00am instead of 6:00pm.
If I book an event at 9:00am on the 26th day of the month, it shows 9:00pm on the 25th day of the month.

It is responding to the times like there is a -12 hour function somewhere. Do you have "twelve hour display" set to yes in the module settings?
Attachments:

12 Hour view in Calendar not showing. 10 years 2 months ago #25279

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
It seems if I edit line 537 from
this.setUTCHours(hours-12);

to this:
this.setUTCHours(hours);
Then it seems to be working perfectly. Will continue testing to see if it works for all scenarios.

12 Hour view in Calendar not showing. 10 years 2 months ago #25280

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
Upon further testing there are still issues:
Joomla at Denver Time			
Start Time Input	Calendar Results		
0:00	12:00pm	Previous Day	Error
1:00	1:00pm	Previous Day	Error
2:00	2:00pm	Previous Day	Error
3:00	3:00pm	Previous Day	Error
4:00	4:00pm	Previous Day	Error
5:00	5:00pm	Previous Day	Error
6:00	6:00am	Current Day	Correct
7:00	7:00am	Current Day	Correct
8:00	8:00am	Current Day	Correct
9:00	9:00am	Current Day	Correct
10:00	10:00am	Current Day	Correct
11:00	11:00am	Current Day	Correct
12:00	12:00am	Current Day	Partially Correct
13:00	1:00am	Current Day	Partially Correct
14:00	2:00am	Current Day	Partially Correct
15:00	3:00am	Current Day	Partially Correct
16:00	4:00am	Current Day	Partially Correct
17:00	5:00am	Current Day	Partially Correct
18:00	6:00pm	Current Day	Correct
19:00	7:00pm	Current Day	Correct
20:00	8:00pm	Current Day	Correct
21:00	9:00pm	Current Day	Correct
22:00	10:00pm	Current Day	Correct
23:00	11:00pm	Current Day	Correct
0:00	12:00am	Current Day	Correct

12 Hour view in Calendar not showing. 10 years 2 months ago #25281

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Chris,

the problem is caused by getUTCHours() - this changes the normal time which causes these issues. Instead of getUTC the solution is using getHours() - but i am still working on a better solution without recalculation in JavaScript (should do that in PHP ... JavaScript just screws it up).

Yves

12 Hour view in Calendar not showing. 10 years 2 months ago #25285

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
For the time being, I am continuing to hide the time in the calendar and including the time in the event description as a temporary work around to the issue with the calendar.

I wasted way too much time today trying to make a work around for the end user. When can we expect to see a fix to this issue?

Thanks,
Chris

12 Hour view in Calendar not showing. 10 years 2 months ago #25354

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
How is the fix coming? The client is wondering why he has to put in the time in the event description.

Thanks,

12 Hour view in Calendar not showing. 10 years 2 months ago #25387

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
I was on vacation last week, but did not forget it. Going to check tomorrow.

Yves

12 Hour view in Calendar not showing. 10 years 1 month ago #25471

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
It has been a month since my original inquiry.
What do we need to do to get the calendar fixed? My client is very frustrated that they can't use the calendar for their event listing. We managed to get every thing else with Matukio working correctly with custom code but the Calendar is a complete mystery as to why it can't calculate the times and days correctly.

Where are you at on this and are you actively working on correcting this issue? What additional information can I give you?

12 Hour view in Calendar not showing. 10 years 1 month ago #25550

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
I have been learning more about parsing, date.timezone, and other configurations that I ever thought prior to trying to get your software to work properly.
Please check these settings:
Server - Timezone set to America/Denver
Joomla/Users - Timezone set to America/Denver
PHP.ini - Timezone set to America/Chicago (changed to America/Denver and resulted in no change to the calendar)

Do these settings have an effect? It seems that regardless or what PHP.ini or the server time is specified in the htpdd.conf file, the timezone specified by Joomla should be what the time offset is calculated on arrived from UTC. Furthermore, I have read that when Javascript parses the date/time string, it is best to have this is the yyyy/mm/dd instead of yyyy-mm-dd format because of calculation errors. Even further, I have found articles that state that mootools has it's only methods for parsing the date/time string outside of how js would normally parse it. To complicate things, there are known issues with JSON creating complications in this conversion as well.

What a mess this is. It would seem to me a simple approach to this problem would be to have what ever process is used for calculating the date/time in the Event Listing also be used in the Calendar. Can the result used by the Event Listing be injected into the calendar without having to parse the date string using js/mootools/JSON?

For a temp fix, I have created a -1 day offset for calendar dates where day is <30 because if the event lands on the 30th or 31st, an offset is not needed. Furthermore, times are only accurate on the calendar between the hours of 6AM to 11:59 PM. Hours of 12AM to 5AM are displayed on an entirely different day all together.

12 Hour view in Calendar not showing. 10 years 1 month ago #25573

  • Chris
  • Chris's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0
Yves,

I have paid an engineer to go over your code in the Calendar and he found multiple issues with how it was written. He has provided a fix and I am currently using it.

If you want to cover some of my costs, I would be happy to share the fixes with you. It was a rewrite in the default.php as well as the mooECal.js file.

Also, since your product was not working as advertised and I have been waiting for working support for over a month now, I would be interested in a refund of my premium support subscription.

I wait for your reply.

12 Hour view in Calendar not showing. 10 years 1 month ago #25574

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 71
  • Thank you received: 556
Hi Chris,

i am currently rewriting the whole calendar to the new jQuery / bootstrap API, replacing all existing old code. This will not only offer a more liable and modern solution, but is also going to fix all current issues with the calendar.

Because that is not a one line fix, but a complete new solution i couldn't offer you a quick fix and asked you to wait for Matukio 3.1, which is going to come out in the next couple of weeks.. I already invested hours finding a quick fix for you, which wasn't working because the whole mootools calendar plugin was messed up and before i would invest more time in that deprecated solution, i prefer offering a new better one... Just asked for some patience..

Best regards

Yves

P.S.: The calendar JavaScript code is not written by us - we are using a mootools plugin for that dansnetwork.com/mootools/events-calendar/
Time to create page: 0.151 seconds