Author |
Message |
tourniqu3t
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 16, 2009
Posts: 91
|
Posted:
Mon Mar 04, 2013 2:16 pm |
|
I know it's in ACP -> Forums -> Configuration -> System Timezone
I set GMT -5
Server date time still shows GMT -6. That settings doesn't affect at all.
I looked at ravenphpscripts server date time. It's GMT -5
My time is Eastern 3:16pm now. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Tue Mar 05, 2013 5:12 am |
|
check your php.ini and set the timezone server wide. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Tue Mar 05, 2013 8:32 am |
|
Also, if you are referring to the server date time as displayed in the user info block, it does not adjust depending on the settings of the forums or individual user. Maybe it should, but as it stands now, it is the time relative to where the server is located, not local time (unless you live in the same timezone as your server). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tourniqu3t
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 2:04 pm |
|
I was looking for php.ini. My friend lives in Canada. He said that time is wrong. It should follow users' computer time. I live in New York. It shows me wrong time too. Thank you for replying. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 2:22 pm |
|
With php you can not follow a local time of a user, because with php you are working on the server. So you must set the time server-wide - before the user get a result. You can use the php.ini or you are make settings in the used php files, e.g. user info block.
http://www.ravenphpscripts.com/postp158789.html#158789 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Tue Mar 05, 2013 2:27 pm |
|
It does not follow your computers time, it follows the server time +/- what you set in Your Account for Forums Timezone. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tourniqu3t
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 8:54 pm |
|
It works great with forums timezone but it doesn't work with server date time. php.ini is hidden in /etc. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 06, 2013 8:07 am |
|
Any changes to php.ini will not happen until the server is restarted. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 06, 2013 9:50 am |
|
Not sure I've ever relied on a website to tell me what time it is locally... Most devices that access websites display that info on-screen anyway. Probably easier to use JavaScript if it is really needed, as opposed to interacting with the db and creating function to format the offset from server to local time, etc... Other info within the Site Info block is also based around server time (such as hits today, new members, etc) and would not be easy to adjust to match local time. Not sure "the juice is worth the squeeze"... JMHO though... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tourniqu3t
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 06, 2013 11:10 am |
|
neralex wrote: | With php you can not follow a local time of a user, because with php you are working on the server. So you must set the time server-wide - before the user get a result. You can use the php.ini or you are make settings in the used php files, e.g. user info block.
http://www.ravenphpscripts.com/postp158789.html#158789 |
I can't findthis code in block-user_info.php like this
Code: if ( !defined('BLOCK_FILE') ) { Header("Location: ../index.php"); die();
|
Nuken is the one who posted in that thread. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 06, 2013 11:43 am |
|
That line of code is at the top of the user info block. After you add it, it should look like this.
Code:
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
date_default_timezone_set('America/New_York');
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tourniqu3t
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Mar 07, 2013 4:38 am |
|
nuken wrote: | That line of code is at the top of the user info block. After you add it, it should look like this.rd
Code:
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
date_default_timezone_set('America/New_York');
| |
That seems to be solved. Let's see what my friend says now. Thanks! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|