- Posts: 6
- Thank you received: 2
Recurring event changes the time on day 11 onwards
- brunopinto
- Offline
- New Member
-
Less
More
12 years 1 month ago #41662
by brunopinto
Replied by brunopinto on topic Re: Recurring event changes the time on day 11 onwards
Hello Tuan,
actually the whole problem with this daylightsaving comes from the fact that you add 24h in your code for a day.
This is not always true as when we change time, we loose or win 1h. So a day may have actually 23 or 25 hours.
Here is the fix for your code.
Everywhere where you add 24h do this: $newDate = strtotime('+'.$numberOfDays.' day', $oldDate);
For example in helper.php in the function getWeeklyRecurringEventDates:
//$nextEventDate = $startTime + $weekDay*24*3600 ;
$nextEventDate = strtotime('+'.$weekDay.' day', $startTime);
Of course you'll have to test this, but this is a more "portable" way to add a day to a timestamp.
I am fixing it myself for my purposes. :whistle:
actually the whole problem with this daylightsaving comes from the fact that you add 24h in your code for a day.
This is not always true as when we change time, we loose or win 1h. So a day may have actually 23 or 25 hours.
Here is the fix for your code.
Everywhere where you add 24h do this: $newDate = strtotime('+'.$numberOfDays.' day', $oldDate);
For example in helper.php in the function getWeeklyRecurringEventDates:
//$nextEventDate = $startTime + $weekDay*24*3600 ;
$nextEventDate = strtotime('+'.$weekDay.' day', $startTime);
Of course you'll have to test this, but this is a more "portable" way to add a day to a timestamp.
I am fixing it myself for my purposes. :whistle:
The following user(s) said Thank You: Laszlo Blaho
Please Log in or Create an account to join the conversation.
- Laszlo Blaho
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
12 years 1 month ago #41992
by Laszlo Blaho
Replied by Laszlo Blaho on topic Re: Recurring event changes the time on day 11 onwards
Hi Bruno!
Can you tell me where can I find this file(s)? Thank you so much!
Blaci
Can you tell me where can I find this file(s)? Thank you so much!
Blaci
Please Log in or Create an account to join the conversation.
- brunopinto
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 2
12 years 1 month ago #41993
by brunopinto
Replied by brunopinto on topic Re: Recurring event changes the time on day 11 onwards
/components/com_eventbooking/helper.php
The following user(s) said Thank You: Laszlo Blaho
Please Log in or Create an account to join the conversation.
- Laszlo Blaho
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
12 years 1 month ago #41994
by Laszlo Blaho
Hah, It's interersting, I haven't got this file.
Replied by Laszlo Blaho on topic Re: Recurring event changes the time on day 11 onwards
Hah, It's interersting, I haven't got this file.
Please Log in or Create an account to join the conversation.
- Laszlo Blaho
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
12 years 1 month ago #41996
by Laszlo Blaho
Replied by Laszlo Blaho on topic Re: Recurring event changes the time on day 11 onwards
I found it here:
/components/com_eventbooking/helper/helper.php
But it doesn't work.
Thanks anyway!
/components/com_eventbooking/helper/helper.php
But it doesn't work.
Thanks anyway!
Please Log in or Create an account to join the conversation.
- Laszlo Blaho
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
12 years 1 month ago #41997
by Laszlo Blaho
Replied by Laszlo Blaho on topic Re: Recurring event changes the time on day 11 onwards
Tuan!
Can you turn off this automatism (Daylight Saving)?
Thanks!
L
Can you turn off this automatism (Daylight Saving)?
Thanks!
L
Please Log in or Create an account to join the conversation.
- brunopinto
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 2
12 years 1 month ago #41998
by brunopinto
Replied by brunopinto on topic Re: Recurring event changes the time on day 11 onwards
Be careful to correct the functions you are actually testing.
And of course not correct it blindly. I just mentioned the method to do it, not the exact code for all the functions.
And of course not correct it blindly. I just mentioned the method to do it, not the exact code for all the functions.
Please Log in or Create an account to join the conversation.
- Laszlo Blaho
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
12 years 1 month ago #41999
by Laszlo Blaho
Replied by Laszlo Blaho on topic Re: Recurring event changes the time on day 11 onwards
Of course! You are right! Thank you!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 1 month ago #42000
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Recurring event changes the time on day 11 onwards
Hi All
Please don't change the code. I am trying to spend this weekend to work on it to find the solution. I will get back to you on Monday !
Tuan
Please don't change the code. I am trying to spend this weekend to work on it to find the solution. I will get back to you on Monday !
Tuan
Please Log in or Create an account to join the conversation.
- mburkart01
- Offline
- New Member
-
Less
More
- Posts: 18
- Thank you received: 0
12 years 3 weeks ago #42441
by mburkart01
Replied by mburkart01 on topic Re: Recurring event changes the time on day 11 onwards
Tuan,
I have had great success with the "Fix daylight savings" functionality. I've used it for the last 4 time changes, but when I try to use it now, I get a 500 - An error has occurred, logout path not found. If you are unable to fully fix the daylight savings issue, can you at least fix the "Fix Day light Saving" menu item so that we can apply the temp fix for now.
Thanks,
Mike
I have had great success with the "Fix daylight savings" functionality. I've used it for the last 4 time changes, but when I try to use it now, I get a 500 - An error has occurred, logout path not found. If you are unable to fully fix the daylight savings issue, can you at least fix the "Fix Day light Saving" menu item so that we can apply the temp fix for now.
Thanks,
Mike
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.