How to get the time independant from the server. I want to get the time from my zone (my server is 4 hours before).
If I need to change the server, so do I need to change the time on the scripts.
Do you know of something more efficient?
I'm thinking about an external time or something like that.
Get time independant from server
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Get time independant from server
hey im assuming from what you said that u are hosting in a country where it is a different timezone, to be able to change this one way of doing it is that you can set the timezone in your htaccess file to do that you'll need a htaccess file in the root of your server possibly public_html,
thats the bit of code that goes into ur .htaccess file, obviously u need to adjust the timezone if its not London. hope that helps
Code: Select all
php_value date.timezone "Europe/London"-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Get time independant from server
I pasted exactly the code you gave me into the .htaccess file in public_html and it gives me an internal server error
Re: Get time independant from server
Code: Select all
php_value date.timezone "Europe/London"- PHPHorizons
- Forum Contributor
- Posts: 175
- Joined: Mon Sep 14, 2009 11:38 pm
Re: Get time independant from server
I've had a problem where my htaccess file needed a line break at the end of it.
Hope that helps.
Code: Select all
php_value date.timezone "Europe/London"