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

Submitted by:  Jan Vilhuber <jvilhuber>
Submitted on:  Thu 26 May 2005 10:00:16 PM UTC  
 
Item Group: 0.9.16.005Category: calendar
Severity: 3 - NormalPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: Dave Hall <skwashd>Open/Closed: Closed
Component Version: BZIP2Operating System: GNU/Linux - SuSE
Reproducibility: Every TimePlanned 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 08 Dec 2005 12:14:36 PM UTCskwashdStatusNone=>Fixed
  Assigned todschaller=>skwashd
Sat 04 Jun 2005 05:02:33 PM UTCdschallerOpen/ClosedOpen=>Closed
  Carbon-Copy-=>Added -unavailable-
Thu 02 Jun 2005 09:10:49 AM UTCskwashdAssigned toNone=>dschaller

Back to the top


Powered by Savane 3.1-cleanup1