Ignore:
Timestamp:
11/10/10 16:07:09 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1322 - Data incorreta nas mensagens na caixa de entrada.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.functions.inc.php

    r3018 r3493  
    11<?php 
    22        class Functions{ 
     3 
     4                // get the offset against GMT. 
     5                function CalculateDateOffset() 
     6                { 
     7 
     8                    $timezone_index = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone']; 
     9                    $zones = $this->getTimezones(); 
     10                    $user_timezone = $zones[$timezone_index]; 
     11                    $tz = new DateTimeZone($user_timezone); 
     12                    $gmt = new DateTimeZone("Etc/GMT+0"); 
     13                    $gmttime = new DateTime("now", $gmt); 
     14                    $offset = $tz->getOffset($gmttime); 
     15                    return $offset; 
     16 
     17                } 
     18 
     19                function getTimezones() 
     20                { 
     21                    $zones = timezone_identifiers_list(); 
     22                    $friendly_zones = array(); 
     23                    foreach ($zones as $zone) 
     24                    { 
     25                        if (preg_match("/^(Africa|America|Antarctica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)\/.*$/", $zone)) 
     26                        { 
     27                            array_push($friendly_zones,  $zone); 
     28                        } 
     29 
     30                    } 
     31                    return $friendly_zones; 
     32                } 
     33 
    334                function CallVoipConnect($params){ 
    435                        $fromNumber = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['telephone_number']; 
Note: See TracChangeset for help on using the changeset viewer.