bugphpGroupWare - Bugs: bug #13203, offset calculation for timezones...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13203: offset calculation for timezones incorrect in class.boicalendar.inc.php

Submitter:  Jan Vilhuber <jvilhuber>
Submitted:  Thu 26 May 2005 10:00:16 PM UTC
   
 
Category:  calendar Item Group:  0.9.16.005
Severity:  3 - Normal Priority:  5 - Normal
Status:  Fixed Privacy:  Public
Assigned to:  skwashd Open/Closed:  Closed
Component Version:  BZIP2 Operating System:  GNU/Linux - SuSE
Reproducibility:  Every Time Planned Release:  None
Fixed Release: 

Thu 08 Dec 2005 12:14:36 PM UTC, comment #3: 

Even better as the generated iCal file uses UTC, this code has now been removed from both stable and development versions of CVS.

Dave Hall <skwashd>
Group administrator
Sat 04 Jun 2005 05:02:33 PM UTC, comment #2: 

I add a support for both + and - timezones

$f = ($gmt_offset[0] == "-") ? -1 : 1;
$offset = $f intval(substr($gmt_offset, 1, 2)) 60 + intval(substr($gmt_offset, 3, 2));
$event['start']['min']   += $offset;
$event['end']['min']     += $offset;
$event['modtime']['min'] += $offset;

see patch for bug #13202

Dirk Schaller <dschaller>
Thu 02 Jun 2005 09:10:49 AM UTC, comment #1: 

Hi Dirk,

do you want to look at this one?

Dave Hall <skwashd>
Group administrator
Thu 26 May 2005 10:00:16 PM UTC, original submission:  

In line 3288 we have the following:

   // use system's date info for caluculating local timezone's offset in minutes
   //
  $gmt_offset = date('O',$GLOBALS['phpgw']->datetime->users_localtime);  // offset to GMT
 $offset = intval(substr($gmt_offset, 1, 2)) * 60 + intval(substr($gmt_offset, 3, 2));
 if ($offset > 0)
  {
        $event['start']['min']   -= $offset;
        $event['end']['min']     -= $offset;
        $event['modtime']['min'] -= $offset;
  }

 
In the 3 lines inside the if-statement, all the '-=' should be '+=', at least in my situation (US/Pacific time).

I've fixed this in my file to be += in all cases, and now the calculation is correct, i.e. an entry for 12pm is adjusted to 7pm GMT (and readjusted in iCal on Mac OS X to 12pm when displaying).


Jan Vilhuber <jvilhuber>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-12-08 skwashd StatusNone Fixed
    Assigned todschaller skwashd
2005-06-04 dschaller Open/ClosedOpen Closed
    Carbon-Copy- Added -email is unavailable-
2005-06-02 skwashd Assigned toNone dschaller

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code