Running code igniter, several sites, one server, different timezones?
I am using code igniter to power our site, but are not using the code igniter date library (just the default php Date),
We have several, sites on the same server,
they reside in
www-nz
www-au www-usbecause all these sites use the same php.ini I cannot use date.timezone.
So I was thinking, sweet as, Ill just use .htaccess SetEnv TZ location
开发者_Python百科e.g Pacific/Auckland
But it is having no effect, I have a feeling that code igniter might be resetting the timezone somewhere...
Anyone have a solution?
date_default_timezone_set() is what I place the top of my index.php files in CodeIgniter. However I've learned that setting everything to UTC and then making any time zone conversions on the client side will save you A LOT of headaches :)
Have you set AllowOverride directive in the apache configuration? it could be that the .htaccess file is being ignored.
The other thing is. You should probably just run this in GMT or local time. Timezone is a client locality thing, not server. If required you should deal with the local time from the client perspective.
精彩评论