Changeset 801b69d in github


Ignore:
Timestamp:
Sep 28, 2011 10:21:41 AM (20 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
985e410
Parents:
4037d38
Message:

Fix timezone settings

Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_config.php

    r65082b3 r801b69d  
    9494        // set timezone auto settings values 
    9595        if ($this->prop['timezone'] == 'auto') { 
    96           $this->prop['_timezone_auto'] = true; 
    9796          $this->prop['dst_active'] = intval(date('I')); 
    98           $this->prop['timezone']   = date('Z') / 3600 - $this->prop['dst_active']; 
     97          $this->prop['_timezone_value']   = date('Z') / 3600 - $this->prop['dst_active']; 
    9998        } 
    10099 
     
    160159        $result = isset($this->prop[$name]) ? $this->prop[$name] : $def; 
    161160        $rcmail = rcmail::get_instance(); 
     161         
     162        if ($name == 'timezone' && isset($this->prop['_timezone_value'])) 
     163            $result = $this->prop['_timezone_value']; 
    162164 
    163165        if (is_object($rcmail->plugins)) { 
     
    217219 
    218220        // override timezone settings with client values 
    219         if ($this->prop['_timezone_auto']) { 
    220             $this->prop['timezone']   = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['timezone']; 
     221        if ($this->prop['timezone'] == 'auto') { 
     222            $this->prop['_timezone_value'] = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['_timezone_value']; 
    221223            $this->prop['dst_active'] = isset($_SESSION['dst_active']) ? $_SESSION['dst_active'] : $this->prop['dst_active']; 
    222224        } 
  • program/js/app.js

    r65082b3 r801b69d  
    384384        var stdtz = new Date().getStdTimezoneOffset() / -60; 
    385385        $('#rcmlogintz').val(stdtz); 
    386         $('#rcmlogindst').val(tz > stdtz ? 0 : 0); 
     386        $('#rcmlogindst').val(tz > stdtz ? 1 : 0); 
    387387 
    388388        // display 'loading' message on form submit, lock submit button 
Note: See TracChangeset for help on using the changeset viewer.