WordPress.org

Plugin Directory


Ignore:
Timestamp:
03/31/17 08:20:26 (4 weeks ago)
Author:
bastho
Message:

Fix event dated at Epok when GMT is not well parsed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • event-post/trunk/eventpost.php

    r1623586 r1626404  
    645645                $address = urlencode($post->address); 
    646646                $url = urlencode($post->guid); 
    647                 $mt = strtotime($codegmt . ' Hours', $event->time_start); 
    648                 $d_s = date("Ymd", $mt) . 'T' . date("His", $mt); 
    649                 $mte = strtotime($codegmt . ' Hours', $event->time_end); 
    650                 $d_e = date("Ymd", $mte) . 'T' . date("His", $mte); 
     647                $allday = ($post->time_start && $post->time_end && date('H:i:s', $post->time_start) == '00:00:00' && date('H:i:s', $post->time_end) == '00:00:00'); 
     648                $d_s = date("Ymd", $event->time_start) . ($allday ? ''  : 'T' . date("His", $event->time_start)); 
     649                $d_e = date("Ymd", $event->time_end) . ($allday ? ''  : 'T' . date("His", $event->time_end)); 
    651650                $uid = $post->ID . '-' . $post->blog_id; 
    652651 
Note: See TracChangeset for help on using the changeset viewer.