Changeset 7956 for trunk


Ignore:
Timestamp:
03/05/13 14:01:46 (11 years ago)
Author:
acoutinho
Message:

Ticket #3372 - Corrigido problema em horarios de eventos com repeticao de alternao entre horario de verao e inverno

Location:
trunk/prototype/modules/calendar
Files:
2 edited

Legend:

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

    r7954 r7956  
    10151015                } 
    10161016 
    1017  
    10181017                if(isset( $v['occurrences'] ) && count( $v['occurrences'] ) > 0){ 
    10191018 
     1019                    $date->setTimestamp((int) ($v['startTime'] / 1000)); 
     1020                    $date->setTimezone( new DateTimeZone( $v['timezone'] )); 
     1021 
    10201022                    foreach( $result[$i]['occurrences'] as &$o){ 
    10211023 
    1022                         $date->setTimestamp((int) ($o / 1000)); 
    1023                         $o = ($date->getTimestamp() + $date->getOffset()).'000'; 
     1024                        $o = ($o + $date->getOffset()).'000'; 
    10241025 
    10251026                    } 
  • trunk/prototype/modules/calendar/schedules.php

    r7952 r7956  
    146146            $result[$i]['DayLigth'] = $DayLigth; 
    147147 
     148 
    148149            if(isset( $v['occurrences'] ) && count( $v['occurrences'] ) > 0){ 
    149150 
     151                $date->setTimestamp((int) ($v['startTime'] / 1000)); 
     152                $date->setTimezone( new DateTimeZone( $v['timezone'] )); 
     153 
    150154                foreach( $result[$i]['occurrences'] as &$o){ 
    151155 
    152                     $date->setTimestamp((int) ($o / 1000)); 
    153                     $o = ($date->getTimestamp() + $date->getOffset()).'000'; 
     156                    $o = ((int) ($o / 1000) + $date->getOffset()).'000'; 
    154157 
    155158                } 
Note: See TracChangeset for help on using the changeset viewer.