Timezone

Started by denede, October 06, 2013, 05:47:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

denede

#5
UPDATE:
tested the code on localhost and another server, everything seems to be ok.. that means the current server config is the problem :)

Quote from: DarkMaster on October 08, 2013, 07:14:23 PM
play with these 2

Code (php) Select
$INSTALLER09['time_adjust'] = 0;
$INSTALLER09['time_offset'] = '0';


well this is set for GMT, because +00:00 is London. And i think if i play with this, people will have the timezone i set here, not what they set in profile.

DarkMaster

play with these 2

Code (php) Select
$INSTALLER09['time_adjust'] = 0;
$INSTALLER09['time_offset'] = '0';
Please Place All Support Questions In The Right Section

denede

#3
i already have this in config

/* Compare php version for date/time stuff etc! */
if (version_compare(PHP_VERSION, "5.1.0RC1", ">="))
date_default_timezone_set('Europe/London');


define('TIME_NOW', time());

$TBDEV['time_adjust'] =  0;
$TBDEV['time_offset'] = '0';
$TBDEV['time_use_relative'] = 1;
$TBDEV['time_use_relative_format'] = '{--}, h:i A';
$TBDEV['time_joined'] = 'j-F y';
$TBDEV['time_short'] = 'jS F Y - h:i A';
$TBDEV['time_long'] = 'M j Y, h:i A';
$TBDEV['time_tiny'] = '';
$TBDEV['time_date'] = '';

DarkMaster

#2
have a look for this in your include/config.php near top

it deals with the time zone there

this is from the 09 code

Code (php) Select
$TBDEV['time_adjust'] =  0;
$TBDEV['time_offset'] = '0';
$TBDEV['time_use_relative'] = 1;
$TBDEV['time_use_relative_format'] = '{--}, h:i A';
$TBDEV['time_joined'] = 'j-F y';
$TBDEV['time_short'] = 'jS F Y - h:i A';
$TBDEV['time_long'] = 'M j Y, h:i A';
$TBDEV['time_tiny'] = '';
$TBDEV['time_date'] = '';


this ones from V3

Code (php) Select
* Compare php version for date/time stuff etc! */
if (version_compare(PHP_VERSION, "5.1.0RC1", ">=")) date_default_timezone_set('Europe/London');
define('TIME_NOW', time());
$INSTALLER09['time_adjust'] = 0;
$INSTALLER09['time_offset'] = '0';
$INSTALLER09['time_use_relative'] = 1;
$INSTALLER09['time_use_relative_format'] = '{--}, h:i A';
$INSTALLER09['time_joined'] = 'j-F y';
$INSTALLER09['time_short'] = 'jS F Y - h:i A';
$INSTALLER09['time_long'] = 'M j Y, h:i A';
$INSTALLER09['time_tiny'] = '';
$INSTALLER09['time_date'] = '';
Please Place All Support Questions In The Right Section

denede

#1
Today i've decided to install the theme system for 09 version. Said & Done. Everything is up&running.
Except the timezone. Until now, i made it work using in the statusbar
"<div><p style='text-align:right;'>".gmdate("l, F jS H:i ", TIME_NOW + get_time_offset()) ."<br />".

when the statusbar code was in bittorrent it worked great on the clock from statusbar, and on comment added time, forum added time, and so on.
but now, when the code is in templates/1/template.php the timezone shows a different one from what it should show.

any suggestions ?

***i've did some sniffing and i've discovered, that to have my correct timezone, i should select a timezone delay with 6 hours.
All i did was to install the theme system mod.
I don't think it's from the server, besides that in php.ini i have Europe/London set.