WordPress.org

Plugin Directory


Ignore:
Timestamp:
01/06/13 00:32:17 (5 years ago)
Author:
joedolson
Message:

Bug fix: upcoming events timestamps converted to UTC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • my-calendar/trunk/my-calendar-templates.php

    r648376 r648481  
    164164    $details['repeats'] = $event->event_repeats; 
    165165    $real_end_date = $event->occur_end; 
    166     //$date = date_i18n( $date_format,strtotime( $event->occur_begin ) ); 
    167     $date = date_i18n( $date_format, $event->ts_occur_begin ); 
     166    $date = date_i18n( $date_format,strtotime( $event->occur_begin ) ); 
     167    $date_utc = date_i18n( $date_format, $event->ts_occur_begin ); 
    168168    $date_end = date_i18n( $date_format,strtotime($real_end_date) ); 
     169    $date_end_utc = date_i18n( $date_format, $event->ts_occur_end ); 
     170    $details['date_utc'] = $date_utc; 
     171    $details['date_end_utc'] = $date_end_utc; 
    169172    $details['image'] = ( $event->event_image != '' )?"<img src='$event->event_image' alt='' class='mc-image' />":''; 
    170173    //$details['time'] = ( date( 'H:i:s', strtotime($event->occur_begin) ) == '00:00:00' )?get_option( 'mc_notime_text' ):date(get_option('mc_time_format'),strtotime($event->occur_begin)); 
    171     $details['time'] = ( date( 'H:i:s', $event->ts_occur_begin ) == '00:00:00' )?get_option( 'mc_notime_text' ):date(get_option('mc_time_format'), $event->ts_occur_begin ); 
     174    $details['time'] = ( date( 'H:i:s', strtotime( $event->occur_begin ) ) == '00:00:00' )?get_option( 'mc_notime_text' ):date(get_option('mc_time_format'), strtotime( $event->occur_begin ) ); 
    172175    $endtime = ( date( 'H:i:s', strtotime($event->occur_end) ) == '00:00:00')?'23:59:00':date( 'H:i:s',strtotime($event->occur_end) );   
    173176    $details['endtime'] = ( $event->occur_end == $event->occur_begin || $event->event_hide_end == 1 )?'':date_i18n( get_option('mc_time_format'),strtotime( $endtime )); 
Note: See TracChangeset for help on using the changeset viewer.