Title: Fixing Validation Errors
Last modified: September 21, 2017

---

# Fixing Validation Errors

 *  ResolvedPlugin Contributor [contemplate](https://wordpress.org/support/users/contemplate/)
 * (@contemplate)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/fixing-validation-errors-2/)
 * While testing importing the iCal into non-Apple calendars I consistently get 
   errors. When I run the iCal feed through a validator it throws errors like this:
   
   Error at line 11:Cannot set timezone for UTC
 * It points to DSTAMP and the way the plugin uses timezones. Then I found a bunch
   of articles pointing to the need for only using the Z format.
 * So I’m suggesting these changes:
 * change this
 *     ```
       $start_time = date( 'Ymd\THis', get_post_time( 'U', false, $post->ID ) );
       $end_time = date( 'Ymd\THis', get_post_time( 'U', false, $post->ID ) + ($options['icalfeeds_minutes'] * 60));
       ```
   
 * to this:
 *     ```
       $start_time = date( 'Ymd\THis', get_post_time( 'U', true, $post->ID ) );
       $end_time = date( 'Ymd\THis', get_post_time( 'U', true, $post->ID ) + ($options['icalfeeds_minutes'] * 60));
       ```
   
 * And then change this:
 *     ```
       $modified_time = date( 'Ymd\THis', get_post_modified_time( 'U', false, $post->ID ) );
       ```
   
 * to this:
 *     ```
       $modified_time = date( 'Ymd\THis', get_post_modified_time( 'U', true, $post->ID ) );
       ```
   
 * and finally change this:
 *     ```
       if ($timezone === 'UTC') {
                   $start_time = ":$start_time" . 'Z';
                   $end_time = ":$end_time" . 'Z';
                   $modified_time = ":$modified_time" . 'Z';
       } else {
                   $start_time = ";TZID=$timezone:$start_time";
                   $end_time = ";TZID=$timezone:$end_time";
                   $modified_time = ";TZID=$timezone:$modified_time";
       }
       ```
   
 * to this:
 *     ```
       $start_time = ":$start_time" . 'Z';
       $end_time = ":$end_time" . 'Z';
       $modified_time = ":$modified_time" . 'Z';
       ```
   
 * Hope that helps.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * (@maximevalette)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/fixing-validation-errors-2/#post-9524296)
 * Added in 1.4.2, thanks 🙂
 *  Plugin Contributor [contemplate](https://wordpress.org/support/users/contemplate/)
 * (@contemplate)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/fixing-validation-errors-2/#post-9607900)
 * Did 1.4.2 ever get released?!?
 *  Plugin Author [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * (@maximevalette)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/fixing-validation-errors-2/#post-9608874)
 * Weird, the commit never went to WordPress. I pushed a dummy commit and it’s OK
   now. Sorry!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fixing Validation Errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ical-feeds.svg)
 * [iCal Feeds](https://wordpress.org/plugins/ical-feeds/)
 * [Support Threads](https://wordpress.org/support/plugin/ical-feeds/)
 * [Active Topics](https://wordpress.org/support/plugin/ical-feeds/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ical-feeds/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ical-feeds/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [maximevalette](https://wordpress.org/support/users/maximevalette/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/fixing-validation-errors-2/#post-9608874)
 * Status: resolved