collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Set / Correct the BeBot Time  (Read 6484 times)

0 Members and 1 Guest are viewing this topic.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Set / Correct the BeBot Time
« 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

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #1 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');


Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #2 on: September 16, 2009, 11:17:10 pm »
Thanx mate!

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #3 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

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #4 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?
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #5 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!
« Last Edit: September 17, 2009, 02:05:56 pm by dillinger »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Set / Correct the BeBot Time
« Reply #6 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 ;)
BeBot Founder and Fixer Kingpin

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Set / Correct the BeBot Time
« Reply #7 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!

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 484
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal