One annoyance with putting my customer's site on shared hosting is not being able to control the date and time on the hosting server. Sure, I could simply host with a local company but that's not always the most cost-effective option.
将我的客户的网站置于共享托管上的一个烦人之处是无法控制托管服务器上的日期和时间。 当然,我可以简单地在一家本地公司托管,但这并不总是最具成本效益的选择。
I use a new function to PHP5, the date_default_timezone_set() function, which allows you to set your time zone. The obvious requirement is PHP5. PHP4 is no longer supported so I look forward to seeing more servers hosting PHP5.
我对PHP5使用了一个新函数,即date_default_timezone_set()函数,该函数可用于设置时区。 明显的要求是PHP5。 不再支持PHP4,因此我期待看到更多托管PHP5的服务器。
date_default_timezone_set('America/Chicago');
Check out the full list of time zones to see which one you should use.