[RCD] Different Timezone offsets in my RoundCube log
klimpong at gmail.com
Tue Jul 14 17:15:46 CEST 2009
On Tue, Jul 14, 2009 at 5:01 PM, Roland Liebl<roland at roland-liebl.de> wrote:
> On Tue, 14 Jul 2009 16:36:28 +0200, till <klimpong at gmail.com> wrote:
>> On Mon, Jul 13, 2009 at 11:33 AM, Roland Liebl<roland at roland-liebl.de>
>>> how can it happen that I have different timezone offsets in my logs?
>>> The write_log function in main.inc should default to php time().
>>> But why can this result in different timezone offsets?
>>> Some insight please ...
>>> Currently it is hard to track back issues back to apache access
>>> [09-Jul-2009 07:00:49 +0200]: Successful login for demo0 at mail4us.net
>>> 1175) from 188.8.131.52
>>> [09-Jul-2009 02:26:39 -0400]: Successful login for demo at mail4us.net (id
>>> 1171) from 184.108.40.206
>>> [10-Jul-2009 07:39:56 +0900]: Successful login for demo at mail4us.net (id
>>> 1215) from 220.127.116.11
>> That's totally weird. The logs are not aggregated from different
>> servers and the servers are not in sync, or something? I could see how
>> the date would look different depending on what "created" the entry
>> (e.g. PEAR vs. native PHP). But that's not the case. Any pointers?
> It is running on a VPS of HostEurope. It is really weird because
> all the apache logs are in sync. It only occurs within the RoundCube logs.
> I will try modify function write log to use date() with second (optional)
> argument [, int timestamp]. At the moment it looks like if date() function
> was used with a different "timestamp" according to user's timezone offset
> in the function format_date within one request it "remembers" user's
> timezone for creating the log line.
Hehe... ! I just added a check to the installer for a (correct)
date.timezone in php.ini. When none is added, it assumes the user's it
seems. I just tested it on a development server in the u.s. (usually
America/Chicago) and when I added "Lalalala/Foo" to the php.ini it
assumed Europe/Berlin instead.
List info: http://lists.roundcube.net/dev/
More information about the Dev