Jump to content
xisto Community
Feelay

Change Server Time?

Recommended Posts

I guess that the server time is the local time for the city where the server is physically located.Of course, like in my forum, the time seen by the user is the user's PC local time.

Share this post


Link to post
Share on other sites

if you're using PHP and if the server supports PHP5, you can always set the the timezone and as I know you even can get an error if you're using date functions and didn't set it, here is the function: http://php.net/date_default_timezone_set

on PHP4 you couldn't do that, instead it was using the server time, but that was easy to avoid, when you know where the server is or even you don't know, you can just get the server time see at your clock on your hand or in the computer and just add or minus the hours needed, I mean change the GMT to + or - something.. :P

I personally use .htaccess that I wouldn't need to do it in all the PHP stuff everytime, like this:

php_value date.timezone "Europe/Vilnius"php_value date.default_latitude 54.7233php_value date.default_longitude 25.2233php_value date.sunrise_zenith 90.833333php_value date.sunset_zenith 90.833333

So you can change whatever you want or the settings you live in, for example this cooridantes are the place I live in ~1km radius ;)

Just put the .htaccess file in your root directory, before public_html if you want it to work everywhere.. :P
Edited by Quatrux (see edit history)

Share this post


Link to post
Share on other sites

By the way, from a semantic point of view as well as from a generalized relativity theory point of view... ;) Doing this you are not changing the Xisto computer server time, you are changing the way the connected users see the system clock.

Share this post


Link to post
Share on other sites

I know ;) But, I have "last login" on my website, and I am going to add a clock. And why would a user in The USA know how much the clock is here in sweden :P?

Share this post


Link to post
Share on other sites

I think that this is exactly what the Xisto forum precisely does : I see that your previous post is dated five minutes ago, in terms of my local time. And probably, your local time is not mine, and is not Xisto's city time.

Share this post


Link to post
Share on other sites

can you help me find a code that will show the localtime on the users pc. can't find any =/

 

Thanks //Feelay

 

(EDIT: I just realized that i have double posted. didn't see that earlier. I am veryvery sorry for that.)

Edited by Feelay (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.