Jump to content
The Uniform Server Community

Server time?


toro
 Share

Recommended Posts

Hello,

 

First my thank you to the volunteer/developer of this package.

 

I have a question in changing my server time I've tried using

 

 

"date.timezone = "Canada/Mountain"" and "America/Edmonton

 

in my php.ini/php development and php cli. still my server timezone wont change to the above time.

 

any reason i could be doing this wrong?

 

 

thanks,

 

msevero :)

 

UniServer 5.6b

windows xp

Link to comment
Share on other sites

First thanks for stating the US version.

 

The line:

date.timezone = "Canada/Mountain"

As you rightly pointed out should be placed in each of these files

php.ini

php.ini_delvelopment_nano

php.ini_production_nano

php-cli.ini

 

Background php.ini is the file PHP uses at start-up. Switching between production and development switches in the corresponding file that overwrites php.ini (Note you need to restart the server for any changes to be picked up) The control uses php-cli.ini no real need to change this file.

 

I added the above line to php.ini and it works correctly.

Now assuming you have not made a typo it is possible that a third party application is overriding the setting!

 

A quick test is to edit file UniServer\www\.htaccess

At the end of this file add the following line:

php_value  date.timezone "Canada/Mountain"

Create a new file UniServer\www\time.php

Add this code:

<?php
echo date("l, F d, Y h:i" ,time());
?>

Run the file as follows type into your browser:

http://localhost/time.php

 

(Note: No need to restart servers)

That should display the correct time for your time zone.

If it does either the problem is a typo or a third party application.

 

All the best

Ric :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...