Changeset 7967 for branches/2.5


Ignore:
Timestamp:
03/05/13 18:54:01 (11 years ago)
Author:
douglas
Message:

Ticket #3372 - Problema com eventos que passem pela data da troca de horário de verão

Location:
branches/2.5/prototype/modules/calendar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/modules/calendar/interceptors/DBMapping.php

    r7966 r7967  
    975975                } 
    976976 
    977  
    978977                if(isset( $v['occurrences'] ) && count( $v['occurrences'] ) > 0){ 
    979978 
     979                    $date->setTimestamp((int) ($v['startTime'] / 1000));  
     980                    $date->setTimezone( new DateTimeZone( $v['timezone'] ));  
     981  
    980982                    foreach( $result[$i]['occurrences'] as &$o){ 
    981983 
    982                         $date->setTimestamp((int) ($o / 1000)); 
    983                         $o = ($date->getTimestamp() + $date->getOffset()).'000'; 
     984                        $o = ($o + $date->getOffset()).'000';  
    984985 
    985986                    } 
  • branches/2.5/prototype/modules/calendar/schedules.php

    r7955 r7967  
    143143            $result[$i]['DayLigth'] = $DayLigth; 
    144144 
     145 
    145146            if(isset( $v['occurrences'] ) && count( $v['occurrences'] ) > 0){ 
    146147 
     148                $date->setTimestamp((int) ($v['startTime'] / 1000));  
     149                $date->setTimezone( new DateTimeZone( $v['timezone'] ));  
     150  
    147151                foreach( $result[$i]['occurrences'] as &$o){ 
    148152 
    149                     $date->setTimestamp((int) ($o / 1000)); 
    150                     $o = ($date->getTimestamp() + $date->getOffset()).'000'; 
     153                    $o = ((int) ($o / 1000) + $date->getOffset()).'000';  
    151154 
    152155                } 
Note: See TracChangeset for help on using the changeset viewer.