My approach with development on ICS Calendar is to release often. Making only minor changes and making them available quickly helps to keep things moving forward and also makes it easy to identify any problems that arise.
If a new release brings dozens of changes, and users discover that something is suddenly not working right for them, it can be difficult and time consuming to try to track down the source of the trouble. By contrast, if a new release only includes a couple of changes, you don’t have to look very far if there’s an issue.
This is also a great approach for bug fixes, because it allows users to get access to a bug fix almost as quickly as it’s identified. In many cases, this can mean problems are fixed before a lot of users even know they’re there.
There are downsides to a fast release cycle, of course… namely, a hasty commit might introduce a problem that would’ve been caught with a more deliberative testing process. But in practice, this approach has been remarkably successful for ICS Calendar and ICS Calendar Pro as they have grown over the past few years.
All of which is a very long introduction to the small feature changes introduced in ICS Calendar 8.5.5 and ICS Calendar Pro 3.5.1…
ICS Calendar 8.5.5: New
By default ICS Calendar caches parsed calendar data for one hour, to improve performance. There is some overhead in downloading the ICS feed source file and then parsing through its contents. Doing this on every page load would not be feasible, especially on sites that get a lot of traffic. So we do this process, and then store that data as a WordPress transient for one hour.
The Pro version includes a configuration setting to let you change that duration, if you want to keep the cached data longer. But the free version has, to this point, not allowed any changes to that transient duration, other than using
reload="true" to tell it not to cache at all, which is not great for sites that get a lot of traffic, but which may be necessary if your calendar changes frequently.
Now there’s a way!
As of version 8.5.5, the way
reload works has changed. Now you can enter any integer value, representing the number of seconds you want that calendar to be cached — yes, now if you have multiple calendars on your site, they can each have a different transient expiration. So for instance, if you want a calendar to be cached for four hours instead of one, you can enter
reload="14400" in your shortcode. The integer value is in seconds, so it’s math time!
ICS Calendar Pro 3.5.1: Override displayed timezones with the
icstz query string variable
This is the first step in the introduction of a new configurable option where you’ll be able to add a timezone dropdown to calendar pages, allowing users to adjust the displayed dates/times of events to their local timezone. This is great for sites that have users in multiple timezones and calendars that display virtual events users will be joining remotely.
Version 3.5.1 introduces the first part of this functionality. The dropdown doesn’t exist yet, but you can now use
icstz in your URL query string to pass a specific timezone to apply to the calendars on that page.
For instance, if your calendar URL is:
…and your site’s default timezone is
America/Chicago, but a user wants to see the calendar in Eastern Time, they can do that with this URL:
From this point, if you’re comfortable with HTML code, you could easily add a simple dropdown to allow users to pick from the main Continental US timezones as such:
<form method="get" action="."> <select name="icstz" onchange="jQuery(this).closest('form').submit();"> <option value="America/New_York">Eastern Time</option> <option value="America/Chicago">Central Time</option> <option value="America/Denver">Mountain Time</option> <option value="America/Phoenix">Arizona Time</option> <option value="America/Los_Angeles">Pacific Time</option> </select> </form>
This is merely intended as an example and of course it omits some timezone areas that deviate from the standard Daylight Saving Time schedule — a good example of why the named timezones are so important!
Version 3.6.0 of ICS Calendar will add an option to turn on an automatic timezone dropdown menu on your calendar pages, so you won’t need to use this code. But if you’re eager to get started right now, this should set you on the right track.