Community Forums

Important Notice:

Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.

Go Back   HostNine Community Forums > H9 General Forums > Lounge / Off Topic > Web Hosting

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2007, 07:41 PM
Liam Liam is offline
Junior Guru Wannabe
 
Join Date: Nov 2006
Posts: 30
Default Possible to set timezone?

I've just come across a problem I've never thought about before...

I'm based in the UK and realised my scripts no longer have my own timezone for obvious reasons. Basically, I could really do with the time zone being GMT.

I realise it is easy enough to do from within a php script but would like a more permanent fix if possible.

I've tried adding the following to a htaccess to no avail:
SetEnv TZ Europe/London

Any ideas?
Reply With Quote
  #2  
Old 03-30-2007, 11:29 PM
kobra kobra is offline
Web Hosting Master
 
Join Date: Oct 2006
Posts: 595
Default

You can with your dedicated set this in the system:
First:logon as SU

Change directory to /etc
# cd /etc

And I think for centos this is the path to create a symlink:
/usr/share/zoneinfo/?dirname?/zonefile
when this is determined replace the path in the following

# ln -sf /usr/share/zoneinfo/GMT localtime

Now use date command to verify that your timezone is changed:

$ date

If the server is set to use NTP you might have to cron this
Reply With Quote
  #3  
Old 03-31-2007, 08:09 AM
Liam Liam is offline
Junior Guru Wannabe
 
Join Date: Nov 2006
Posts: 30
Default

Cheers for the reply... and umm any suggestions for a mere reseller/shared server?
Reply With Quote
  #4  
Old 05-08-2007, 05:53 PM
Ryan Ryan is offline
Newbie
 
Join Date: May 2007
Location: Calgary, AB
Posts: 4
Default

This is a little late (sorry, I'm new to the forums) but a solution might be the following:

In your .htaccess file, try this:

Code:
php_value date.timezone Europe/London
Available since PHP 5.1.0

A list of PHPs supported timezones is in the appendix, located at: http://ca.php.net/manual/en/timezones.php

Hope that helps!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

Host Nine

Our mission began in 2006. Thousands of awesome clients later, we are now one of the most popular hosters in the world.
Most of this is because of our fantastic support. Join us, you'll be glad you did - that's a given.