如何在PHP中同步时间 [英] How to synchronize time in PHP

查看:187
本文介绍了如何在PHP中同步时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我对如何同步时间有疑问.我需要将邮件发送给收件人,并且该邮件必须有特定的时间.
这是我的问题:
-邮件服务器或Web服务器是否自动同步时间?
-如果没有,请告诉我该怎么做.

谢谢



I have a problem with how to synchronize time. I need to send mail to recipients, and that mail must have specific time.
here is my questions:
- Does mail server or Web server automatically synchronize time?
- If no, please tell me how to do this.

Thanks

推荐答案

您需要让服务器管理员在Web/邮件服务器上设置NTP(网络时间协议)客户端. AFAIK,所有Linux发行版均包含ntpd,应将其配置为在启动时运行.如果您的服务器是Windows,则有一个控制面板设置,可通过NTP自动更新日期/时间.

[几个月前,我管理的一个远程网站被转移到另一家托管公司,直到我大喊大叫为止,时间无处不在.他们似乎并不在乎,我认为这对于托管公司来说是非常不专业的.]

干杯,
彼得
You need to get a server admin to set up an NTP (Network Time Protocol) client on the web/mail server(s). AFAIK, all Linux distros include ntpd, which should be configured to run at startup. If your server is Windows, there is a control panel setting to automatically update date/time through NTP.

[One of the remote websites that I manage was moved to a different hosting company a few months ago, and time was all over the place until I screamed. They didn''t seem to care, which I thought was highly unprofessional for a hosting company.]

Cheers,
Peter


这篇关于如何在PHP中同步时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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