Recurring event in first position shows the wrong date

QuestionsCategory: Events Calendar For GoogleRecurring event in first position shows the wrong date
?s=48&d=mm&r=gBill Sutton asked 3 months ago
Hi Blue Plugins,
We are using the Pro version of your Events Calendar for Google plugin for one of our clients and we’ve found some bugs:
1. When a recurring event is the first event displayed on a page, the date in the left column is incorrect.
2. When you select previous from the first page, the page that displays is strange. It would be best if previous did not display on the first page.
These two bugs are documented in this Loom video:
https://www.loom.com/share/4a0fd6be7de046b09be1da2e66cb42c2
Finally, we’d like to request that you correct the date formats for US audiences. Some of the formats you provide don’t have spaces between the comma and the year and are in formats that are strange for us in the US and Canada.
Here are the four most common date formats used in the US and Canada, which we would like to use in your plugin:
F j, Y (This will display as January 1, 2023. note the space between the comma and the Y. This is the most common US date format.)
M j, Y (This will display as Jan 1, 2023. Also commonly used in the US, with the month abbreviated)
j F Y (This will display as 1 January 2023. It is commonly used in Canada)
j M Y (This will display as 1 Jan 2023. This is an abbreviated format commonly used in Canada)
Thanks for your help!
Bill

6 Answers
?s=48&d=mm&r=gBluePlugins answered 3 months ago
Hi @ Bill,
I Got this issue listed before too. we are trying to figure out what is the actual issue. we will update it in the coming versions.
Thanks
Rupinder@Blueplugins
 

?s=48&d=mm&r=gBluePlugins answered 3 months ago
Hi Bill,
I have some questions in order to figure out the issue .
1)which theme is being used in your given demo.
2)what version of the plugin you are using?
3)Is this plugin been modified further or not?
Thanks 
Rupinder

?s=48&d=mm&r=gBill Sutton answered 3 months ago
Hi Rupinder,

1) We are using Mai Success theme by Bizbudding (a Genesis themes).

2) The latest version of the plugin (Version 2.0.2).

3) We have not modified the plugin code in any way. We have modified only the CSS to get it to display according to our design scheme.

The scenario that causes this behavior is a little different than we thought. Here’s what seems to cause it:

1. The event is named Shabbat (a Jewish holiday)

2. The event is in the first position on the page

Traditionally Shabbat begins on Friday evening and lasts through Saturday evening. Saturday is traditionally the main Shabbat day. But our official service is on Friday at the Synagogue. We are wondering whether Google has its own idea about when Shabbat should be, and is forcing the date to start the day before.

For example, we put in our calendar that Shabbat is Friday, July 14 from 6:00pm to 7:00pm. But the large date that appears says it’s on the 15th. You can see this here:

https://bnaivail.org

Thanks for your help!

?s=48&d=mm&r=gBill Sutton answered 2 months ago
I just realized what the issue is. It’s a time zone conversion issue. We are in Mountain Daylight Time (US), and our WordPress site is scheduled to use that time zone. But there’s a calculation in your plugin that is using UTC. Therefore, any event that occurs after 6:00pm MDT is being calculated as occurring on the next day, since 6pm MDT = midnight UTC.

Hopefully that will help you debug it.

?s=48&d=mm&r=gBill Sutton answered 2 months ago
FYI. I found this note in the developer documentation, which may be of help:

WordPress forcibly processes the date as UTC timezone. In other words, “date” and “i18_date” function don’t work on  WordPress if you want to code other timezone except UTC.  Therefore, you need to use WordPress date functions “current_time” and “get_date_from_gmt” instead of date and i18_date.

?s=48&d=mm&r=gBluePlugins answered 2 months ago
Hi Bill,
Well, I got to know the issue . Thanks for explaining it well. Right now I am trying to add a new option where a user can select their preferred timezone from the plugin settings. You will be able to see these changes in the coming month with the newer version.
Right now if you can change it into your plugin just find the function date_default_timezone_set in the plugin files and set your timezone there. it Should fix the issue for now.But I assure you the next version you will see a dedicated setting section for this issue.
Thanks

Your Answer