Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
tourniqu3t
Regular
Regular



Joined: Jan 16, 2009
Posts: 91

PostPosted: Mon Mar 04, 2013 2:16 pm Reply with quote

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.
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Tue Mar 05, 2013 5:12 am Reply with quote

check your php.ini and set the timezone server wide.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Mar 05, 2013 8:32 am Reply with quote

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).
 
View user's profile Send private message Visit poster's website
tourniqu3t







PostPosted: Tue Mar 05, 2013 2:04 pm Reply with quote

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.
 
neralex







PostPosted: Tue Mar 05, 2013 2:22 pm Reply with quote

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
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Mar 05, 2013 2:27 pm Reply with quote

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! 
View user's profile Send private message Send e-mail Visit poster's website
tourniqu3t







PostPosted: Tue Mar 05, 2013 8:54 pm Reply with quote

It works great with forums timezone but it doesn't work with server date time. php.ini is hidden in /etc.
 
nuken







PostPosted: Wed Mar 06, 2013 8:07 am Reply with quote

Any changes to php.ini will not happen until the server is restarted.
 
spasticdonkey







PostPosted: Wed Mar 06, 2013 9:50 am Reply with quote

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...
 
tourniqu3t







PostPosted: Wed Mar 06, 2013 11:10 am Reply with quote

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.
 
nuken







PostPosted: Wed Mar 06, 2013 11:43 am Reply with quote

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');

 
tourniqu3t







PostPosted: Thu Mar 07, 2013 4:38 am Reply with quote

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!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©