Calendar Subscribers not getting events
-
Our events calendar displays our events and works fine on our website. If you subscribe to the calendar, the subscription portion works fine; however, none of the events get synched to your personal calendar. This used to work perfectly for the past couple years, but stopped sometime in November or the beginning of December 2025. This is not just for our site, but all the organizations on this server supporting all the TXMG & TXMN organizations. After much testing and research I found a number of things:
According to the iCalendar standard (RFC 5545), DTSTAMP must be in UTC format ending with Z. Without it, many calendar apps (especially Google Calendar subscriptions, Outlook, and various enterprise/county systems) either reject the feed or fail to update properly.If you export events https://guadalupecountymastergardeners.org/events/?ical=1 and open with notepad then search for DTSTAMP you will see none of them end with a Z (thus not UTC compliant).
Additionally, it appears that the core issue is in Tribe__Events__iCal::generate_ical_feed() using date(‘Ymd\THis’, time()) instead of gmdate(‘Ymd\THis\Z’, time()). This breaks every county site on the platform. Please patch it in the next release so we don’t need a workaround on every child site.
I have admin access to my site, but not the server or the actual plugins. I have to rely on TAMU support which I have been trying to have them fix since I first reported it in early December 2025. While this appears to be a problem for many folks/companies going back at least to 2017 from what I found it seems most implement various workarounds rather than the root problem being fixed.
I provided a simple plugin that would check the final ical string and modify it ONLY IF necessary by adding the missing “Z”. That plugin is shown below. Since I am limited in what I can actually see, do & test here, and although it doesn’t appear to be an obvious issue, but could be for some users is the VCALENDAR header. Even if the header is okay, these related issues below often cause subscription failures:
- Missing or incomplete VTIMEZONE block — Many clients (especially older Outlook versions) are picky and want a full BEGIN:VTIMEZONE definition with STANDARD/DAYLIGHT components.
- X-WR-TIMEZONE — TEC sometimes uses this non-standard property. It works for Google/Apple but can cause issues with Outlook.
- DTSTART/DTEND timezone handling — Events using floating times or mismatched TZIDs can shift when imported.
So with that in mind I have put together a second option and actually a third plugin option as well. The second option simply incorporates basic VTIMEZONE for better compatibility. Additionally since we are only supporting Texas here we could further clarify and set things for central time which is the third option. If this server were running and supporting multiple time zones then we could not do this third Texas (Central Time) specific option.
My preference would be that the vendor fix the events calendar plugin, my second choice would be to get AgriLife support to implement my first suggested plugin by creating and putting it under the folder: /wp-content/mu-plugins/ so /wp-content/mu-plugins/fix-tec-dtstamp.php. I can supply the 2nd & 3rd plugins if needed, but first looking for feedback and advice and hoping maybe this truly can be fixed rather than having to have a custom plugin to fix it.
Suggested plugin: fix-tec-dtstamp.php
<?php
/**- Plugin Name: Fix The Events Calendar DTSTAMP (UTC + Z)
- Description: Forces proper DTSTAMP:YYYYMMDDTHHMMSSZ format so calendar subscriptions work on Google, Outlook, Apple, etc. Required for all Agrilife county sites.
- Version: 1.1
- Author: Custom Fix for Guadalupe County Master Gardeners
- Network: true
*/
// Prevent direct access
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}add_filter( ‘tribe_ical_feed_item’, ‘fix_tec_dtstamp_proper_utc’, 20, 2 );
/**
- Fixes DTSTAMP to always be in UTC with trailing Z
*/
function fix_tec_dtstamp_proper_utc( $item, $post ) { // Remove the broken DTSTAMP generated by The Events Calendar
foreach ( $item as $key => $line ) {
if ( strpos( $line, ‘DTSTAMP:’ ) === 0 ) {
unset( $item[ $key ] );
break;
}
} // === Option A: Always use current time (Simple & Safe) ===
$dtstamp = gmdate( ‘Ymd\THis\Z’ ); // === Option B: Use event last-modified time (Uncomment if preferred) ===
// $modified = get_post_modified_time( ‘Ymd\THis’, true, $post->ID ); // true = GMT
// $dtstamp = $modified ? $modified . ‘Z’ : gmdate( ‘Ymd\THis\Z’ ); $item[] = ‘DTSTAMP:’ . $dtstamp; return $item;
}
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.