If you are a web developer or a webmaster working on different hosting accounts or servers, each one on different datacenters or simply each one with a different time zone, you may have already experienced the timezone related problems in the web scripts.
This problem comes when you are over a shared hosting and have different web site that runs for different time zones than the server's one.
As you are over a shared hosting, the time zone in the server is set to a specific timezone, for example in our shared hosting servers is set to GMT0, so every call to PHP date() and/or time() function will allways return the server's time causing a mismatch with your website local time.
To workaround this situation, you can change your default date and time using a PHP function:
date_default_timezone_set ( $timezone_identifier )
For example for Los Angeles timezone:
Add this line in your web site PHP script where you are having the date/time issue, before executing/calling any date and/or time functions.
You can read more about this function at:
and see the timezones list at:
- 0 Users Found This Useful
How can i change the MySQL characters encoding to UTF8?
By default the encoding is latin1 but you could try to workaround your code. To change the...Oscommerce is showing a blank page in the categories pages
If you made no changes in your account or oscommerce script and this happened suddenly then there...I have the register_globals disabled server wide, how can i enable it in my account?
This option is available in all our shared cPanel hosting accounts.Please note if your script is...How could i change the PHP encoding in my scripts?
You could try changing it sending the headers in your php code, i.e.: header('Vary:...How do i parse .html files as .shtml (SSI)?
You can add the following line in your .htaccess file: AddHandler server-parsed .html or...