server time

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
huricane
pedestrian
pedestrian
Posts: 5
Joined: 19 Jul 2009 17:18
Owned TM-games: TMUF

server time

Post by huricane » 24 Aug 2010 11:33

hello
i just set a new aseco server and i want to change to french time

how to set it please?

thank

Xymph
Pit Crew
Pit Crew
Posts: 5724
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: server time

Post by Xymph » 24 Aug 2010 17:13

huricane wrote:i just set a new aseco server and i want to change to french time

how to set it please?
That's not a (X)Aseco problem but a Linux/Windows problem. Just set the right time and timezone, and XAseco will display the local time.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

huricane
pedestrian
pedestrian
Posts: 5
Joined: 19 Jul 2009 17:18
Owned TM-games: TMUF

Re: server time

Post by huricane » 24 Aug 2010 21:15

my windows is on a corect time
i use a onyx serv also and the time is corect too

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland

Re: server time

Post by jouko100 » 25 Aug 2010 03:07

modify this in fufiwidget.php and set $hourdiff for ur country

Code: Select all

function showClockWidget(){
if (!$this->settings["clockwidget"]["enabled"]) return;
$hourdiff = "1"; 
$timeadjust = ($hourdiff * 3600);

$time = time();

$localTime = date($this->settings["clockwidget"]["timeformat"], time()+3600+$timeadjust);

//sends the new time if necessary

if ($localTime!=$this->localTime){
$this->localTime = $localTime;
$page = $this->settings["clockwidget"]["xml"];
$page = str_replace(array("%manialinksid%", "%widgetid%", "%widgetpos%", "%time%"), array($this->manialinksID, $this->clockWidgetID, $this->settings["clockwidget"]["states"]["0"]["pos"], $this->localTime), $page);
$this->sendML($page, 'Sending clock widget', 'cl');
}
}

corto-72
smooth traffic navigator
smooth traffic navigator
Posts: 284
Joined: 28 Jul 2008 16:12
Owned TM-games: TMUF
Location: Toulouse
Contact:

Re: server time

Post by corto-72 » 25 Aug 2010 07:29

Isn't the problem more related to the timezone definition in the php config file?
2 options , either modify the php.ini file (setting correctly the date.timezone parameter to 'Europe/Paris'), or inside the plugin (or the main part of Xaseco) inserting

Code: Select all

date_default_timezone_set('Europe/Paris');
Should fix the issue I believe...

JP100NX
pedestrian
pedestrian
Posts: 8
Joined: 18 Nov 2006 17:31
Location: France - Var

Re: server time

Post by JP100NX » 23 Sep 2011 11:37

Hi all.

I use XAseco 0.93 for TM²Canyon and USBWebserver for Apache/MySQL.

I tried the manipulations described here. My php.ini does not save my change for date_default_timezone_set ('Europe / Paris'), he returns to London at every startup.

I tried to put the file in read-only here but then refuses to run.

So I just looked, I found in xaseco2.php lines :

Code: Select all

// define process settings
if (function_exists('date_default_timezone_get') && function_exists('date_default_timezone_set'))
	date_default_timezone_set(@date_default_timezone_get());
ini_set('memory_limit', '50M');
setlocale(LC_NUMERIC, 'C');
Can I change something here?
Or elsewhere?

Thx.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: server time

Post by Slig » 23 Sep 2011 16:07

JP100NX wrote:date_default_timezone_set ('Europe / Paris')
You really wrote it that way ? it should be 'Europe/Paris' (without spaces).
List of php timezonesvalid values: http://www.php.net/manual/en/timezones.php

Alternatively, on linux you can also set the TZ value before starting the php script, so something like:
export TZ="Europe/Paris"
List of valid TZ values : http://www.vmware.com/support/developer ... ezone.html

JP100NX
pedestrian
pedestrian
Posts: 8
Joined: 18 Nov 2006 17:31
Location: France - Var

Re: server time

Post by JP100NX » 23 Sep 2011 17:06

Hey salut Slig merci pour la réponse ! ... Hi ! Thx for answer !
(c'est AGM-JP ... supersprint power!)

Sorry i wrote it whithout spaces ! Wrong copy/paste i'm a boulet !
So.. why my php.ini reset at every startup.

It's crazy !

EDIT : i edited the php.ini in \USBWebserver_v8_en\php\ and it's not the good !
There is a second php.ini in \USBWebserver_v8_en\settings\ and it's work ok !!
Damned ..... :shock:

Mistake fixed, thx :1

Post Reply