php mysql 站点的最佳时区设置是什么?

编程入门 行业动态 更新时间:2024-10-23 08:40:30
本文介绍了php mysql 站点的最佳时区设置是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在运行一个网站,我需要设置时区.哪个是最可取的时区?我的服务器在 GoDaddy.所以有人帮我通过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. 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 站点的最佳时区设置是什么?

本文发布于:2023-07-17 06:44:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1130514.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时区   站点   php   mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!