Results 1 to 2 of 2

Thread: The DST and TimeDate class

  1. #1
    wagnerbl is offline Sugar Community Member
    Join Date
    Apr 2005
    Posts
    330

    Default The DST and TimeDate class

    On includes/TimeDate.php line ~46 you have something like this.
    PHP Code:
        if(isset($user))
            {    
                if(
    $usertimezone $user->getPreference('timezone')) {//notice just one = here
                        
    if(empty($timezones[$usertimezone])) {
                            
    $GLOBALS['log']->fatal('TIMEZONE:NOT DEFINED-'$usertimezone);
                            
    $usertimezone = array();
                        } else {
                            
    $usertimezone $timezones[$usertimezone];
                        }
                }
            } 
    is this a bug or no?

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: The DST and TimeDate class

    It's not really a bug. When we built this class, we realized that the fluid nature of time zones, political and otherwise, requires a pretty constant refresh of those values (GMT offsets, DST, etc.).

    What this part of the code does is checks the User's TZ against the (maybe) refreshed timezones.php file that is generated from timezone data we receive from outside the app, and then if a change is detected, resets it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •