Login or Register

RSS IconRecent posts in this topic

avatar
Beni on May 3. 2007. 3:45 pm
Update: Forget about what I wrote in this post... I realised that I have a problem with daylight saving and not with a timezone offset. This hack solves the daylight saving problem, but it causes another problem with the milestone dates... I'll work on a hack that solves this problem too...


Ilija Studen:
activeCollab currently works only with GMT dates so if you are in timezone different than GMT all dates in the system will be offset. http://www.activecollab.com/forums/topic/1254/


If you want to fix that before the release of 1.0, you can try hacking the file

/environment/classes/localization/Localization.class.php

like I did. I changed the functions 'formatDate', 'formatDescriptiveDate', 'formatDateTime' and 'formatTime'. All these functions return a formatted date string in this way (example from 'formatDate'):

return date($this->date_format, $date->getTimestamp() + ($timezone * 3600));


I replaced $timezone by ($timezone + 1) because I live in GMT +1 (Germany), so that the line of code became:

return date($this->date_format, $date->getTimestamp() + ( ($timezone + 1) * 3600));


You have to replace $timezone (just in the 'return'-line of the code) within the functions 'formatDate', 'formatDescriptiveDate', 'formatDateTime' and 'formatTime'. If you live in GMT +10 or something else, try ($timezone + 10).


Update: Forget about what I wrote in this post... I realised that I have a problem with daylight saving and not with a timezone offset. This hack solves the daylight saving problem, but it causes another problem with the milestone dates... I'll work on a hack that solves this problem too...
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic