BeBot - An Anarchy Online and Age Of Conan chat automaton

General => Feedback and Suggestions => Topic started by: dillinger on September 16, 2009, 11:10:07 am

Title: Set / Correct the BeBot Time
Post by: dillinger on September 16, 2009, 11:10:07 am
Hi Community

My question is: How can i set the correct time on the BeBot? Our Server runs in Germany.

Can you please post me the command or the specific location of the file to adjust this?

Thanx in advance,

Dill
Title: Re: Set / Correct the BeBot Time
Post by: Getrix on September 16, 2009, 09:50:23 pm
Main.php

Line 55:

Code: [Select]
// Set the time zone to UTC
date_default_timezone_set('UTC');

For you it will be if i dont take wrong:
Code: [Select]
date_default_timezone_set('CET');


Title: Re: Set / Correct the BeBot Time
Post by: dillinger on September 16, 2009, 11:17:10 pm
Thanx mate!
Title: Re: Set / Correct the BeBot Time
Post by: dillinger on September 17, 2009, 01:11:01 pm
Hm, so far so good!

Now I have the correct Time-format; BUT not the correct time!

Is there a hack to change/set the time in BeBot?

Thanx for your help!

Dill
Title: Re: Set / Correct the BeBot Time
Post by: Getrix on September 17, 2009, 01:12:45 pm
Are you sure you have the correct time on your computer/server running bebot?

Anf if, whats the diff in time between bebot reporting and your computer time?
Title: Re: Set / Correct the BeBot Time
Post by: dillinger on September 17, 2009, 01:30:57 pm
Jep, the servertime is correct, I sync it every hour via a NTP client!

Now I tried to change the date.timezone in the PHP.INI to "Europe/Berlin" - No effect! The time (!time) ingame is still 2hrs less than my local time!
Title: Re: Set / Correct the BeBot Time
Post by: Khalem on September 17, 2009, 03:05:32 pm
BeBot uses the php function gmdate() which reports UTC which is also the official time in Anarchy Online.

Recently however and especially for AoC people have started asking for being able to change the time zone.
This is currently not supported out of the box, but you can edit the source code yourself and change gmdate calls to date calls.

Most notably you will most likely be looking for core/Time.php  which controls !time.

On a side note. BeBot reports the correct time, it just doesn't report the timezone you want it to ;)
Title: Re: Set / Correct the BeBot Time
Post by: dillinger on September 17, 2009, 05:06:25 pm
I changed
Code: [Select]
$output = "It is currently ".gmdate("H:i:s F j, Y");To
Code: [Select]
$output = "It is currently ".date("H:i:s F j, Y");And it worked!

Thanx for your support!
SimplePortal 2.3.7 © 2008-2024, SimplePortal