php mysql 站点的最佳时区设置是什么? [英] Which is the best TimeZone settings for php mysql site?

查看:34
本文介绍了php mysql 站点的最佳时区设置是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个网站,我需要设置时区.哪个是最可取的时区?我的服务器在 GoDaddy.com.所以有人帮我通过php设置时区.

i am running a site and i need to set the timezone. which is the most preferable time zone?? my server is in GoDaddy.com. So any one help me to set the time zone via php.

推荐答案

参见 date_default_timezone_set

至于时区:我认为这取决于您网站的性质.

As for the time zone: That depends on the nature of your site, I would say.

  • 您可以让用户选择他们的时区 - 很好,例如用于个性化网络应用.
  • 您可以将其设置为服务器的时区 - 如果您不在乎
  • 您可以将其设置为您的企业或用户社区所在的时区 - 最适合企业网站和本地化社区
  • 您可以像 Stack Overflow 一样将其设置为 UTC.在面向全球受众运营时可能最有意义,这样用户之间的沟通就不会出现问题(但在 2:21 的评论中,您说...")
  • You could have the user choose their time zone - nice e.g. for a personalized web app.
  • You could set it to the server's time zone - if you don't care
  • You could set it to the time zone where your business or user community is located - makes most sense with business sites and localized communities
  • You could set it to UTC, as Stack Overflow does. Makes probably the most sense when operating for a global audience, so that things don't get up in inter-user communication ("but in your comment at 2:21 you said...")

这篇关于php mysql 站点的最佳时区设置是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆