protection
French 
CrawlTrack, webmaster dashboard.
Web analytic, SEO and protection

CrawlProtect, your website safety.
Reinforced protection

Two php/MySQL scripts, free and easy to install
The tools you need to manage and keep control of your site.





diable

CrawlTrack and CrawlProtect support forum

You are not logged in.


#1 15-04-2006 15:23:32

Towerade
Membre
Registered: 22-11-2005
Posts: 54

GTM Time

I'm in GTM +1, and there is 6 hours betwen my time and the server time. ¿How can i change hour to my local time?

Sergio


www.sergiodelatorre.com

Offline

 

#2 19-04-2006 18:00:37

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

Hi Sergio,

I'm just coming back from a few days in Barcelona; I will think of it and keep you inform.

Jean-Denis


CrawlTrack & CrawlProtect developer

Online

 

#3 21-04-2006 11:22:36

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

I have studied the possibilties, there is a lot of changes to make to implement this.
It will be part of the next release, it's currently under testing. I hope that it will be ready in a few days.


CrawlTrack & CrawlProtect developer

Online

 

#4 21-04-2006 12:27:36

Towerade
Membre
Registered: 22-11-2005
Posts: 54

Re: GTM Time

Thnks for your time. You are making better a very useful script

Sergio


www.sergiodelatorre.com

Offline

 

#5 29-04-2006 00:29:55

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

The version 1.4.0 is available, it's now possible to use your local time.


CrawlTrack & CrawlProtect developer

Online

 

#6 29-04-2006 13:46:19

Towerade
Membre
Registered: 22-11-2005
Posts: 54

Re: GTM Time

Nothing happens ¿?

http://img19.imageshack.us/img19/6855/hora3kl.gif


www.sergiodelatorre.com

Offline

 

#7 29-04-2006 17:52:25

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

Hi, Could you please send me a screen shot of javascript on the source code of that page (I put an example below); I need it to understand .

<script language="Javascript">
    <!--
    function formate2(nombre) {
    return (nombre < 10) ? "0" + nombre : nombre;
    }

    Date.prototype.display_date_hour = function() {
    var ch = formate2(this.getDate()) + "/" + formate2(eval(this.getMonth() + 1)) + "/" + this.getFullYear();
    ch += " " + formate2(this.getHours()) + ":" + formate2(this.getMinutes()) + ":" + formate2(this.getSeconds());
    return ch;
    }

    var local = new Date();
    // to convert the difference in hour
    var diff = (1146325833 - Math.round(local / 1000))/3600;
    var diffh = Math.round( diff);
    document.write("<p>Date et heure locale= " + local.display_date_hour() + "</p>");
    document.write("<p>Différence en heures entre l'heure du serveur et l'heure locale= " + diffh + "</p>");

            document.write("<h5>Vous utilisez actuellement l'heure du serveur, voulez vous que les données soient affichées en utilisant votre heure locale ?</h5>");       
        document.write("<h2><a href='index.php?decal=" + diffh + "&amp;navig=6&amp;validform=18&amp;validlogin=1'>Oui</a>&nbsp;&nbsp;&nbsp;<a href='index.php?navig=6'>Non</a></h2>");   
        <!--

    </script

Waiting a correction, you can modify manually your configconnect.php file and put :

$times="-6";

It will give you the time shift needed.


CrawlTrack & CrawlProtect developer

Online

 

#8 29-04-2006 18:12:20

Towerade
Membre
Registered: 22-11-2005
Posts: 54

Re: GTM Time

In think last "<!--" must be "-->"... But doesn´t work

Last edited by Towerade (29-04-2006 18:15:31)


www.sergiodelatorre.com

Offline

 

#9 29-04-2006 18:15:01

Towerade
Membre
Registered: 22-11-2005
Posts: 54

Re: GTM Time

<script language="Javascript">
    <!--
    function formate2(nombre) {
    return (nombre < 10) ? "0" + nombre : nombre;
    }

    Date.prototype.display_date_hour = function() {
    var ch = formate2(this.getDate()) + "/" + formate2(eval(this.getMonth() + 1)) + "/" + this.getFullYear();
    ch += " " + formate2(this.getHours()) + ":" + formate2(this.getMinutes()) + ":" + formate2(this.getSeconds());
    return ch;
    }

    var local = new Date();
    // to convert the difference in hour
    var diff = (1146327049 - Math.round(local / 1000))/3600;
    var diffh = Math.round( diff);
    document.write("<p>Fecha y hora local= " + local.display_date_hour() + "</p>");
    document.write("<p>Diferencia en horas entre la hora del servidor y la hora local= " + diffh + "</p>");

            document.write("<h5>Estás usando la hora del servidor, ¿quieres usar la hora local para visualizar la información?</h5>");       
        document.write("<h2><a href='index.php?decal=" + diffh + "&amp;navig=6&amp;validform=18&amp;validlogin=1'>Si</a>&nbsp;&nbsp;&nbsp;<a href='index.php?navig=6'>No</a></h2>");   
        <!--

    </script>


www.sergiodelatorre.com

Offline

 

#10 29-04-2006 18:56:25

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

Hi Sergio,

I have send to you by Email a new admintime.php file to try.

Keep me inform,


CrawlTrack & CrawlProtect developer

Online

 

#11 30-04-2006 03:57:46

Jidébé
Administrateur
Registered: 30-10-2005
Posts: 2924

Re: GTM Time

This is now corrected in the available file (it's a new admintime.php file), thank you for your help.


CrawlTrack & CrawlProtect developer

Online

 

#12 30-05-2010 14:39:36

gezgin123
Nouveau membre
Registered: 30-05-2010
Posts: 1

Re: GTM Time

I've solved that problem


date_default_timezone_set('Europe/Berlin');

add
configconnect.php

php.net/manual/en/function.date-default-timezone-set.php

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB