如何根据管理栏中的WordPress博客显示时间

If you never adjusted your timezone setting in WordPress, you probably have no idea what is the time according to your WordPress blog. For a lot of people, it does not matter. However, if you have a time-sensitive post that you want to schedule, then it is probably a good idea to know what is the server time. Having the server time available in the admin bar can also be great for multi-author blogs (specially if the authors are in different time zones). In this article, we will show you how to display the time according to your WordPress in the Admin Bar.

如果您从未在WordPress中调整时区设置,那么根据您的WordPress博客,您可能不知道现在几点钟。 对于很多人来说,这并不重要。 但是,如果您要安排一个对时间敏感的帖子,那么知道什么是服务器时间可能是一个好主意。 对于多作者博客(特别是当作者位于不同时区时),在管理栏中提供服务器时间也非常有用。 在本文中,我们将向您展示如何根据管理栏中的WordPress显示时间。

First thing you need to do is install and activate the Blog Time plugin. Upon activation, you will notice that time will appear in the admin bar.

您需要做的第一件事是安装并激活Blog Time插件。 激活后,您会注意到时间将显示在管理栏中。

Blog Time

In the backend, the Blog Time works like a clock. However, when on the front-end it is just a timestamp from when the page was loaded. Aside from the admin bar, you can also show this in your sidebar using the widgets as well as include it in your theme using a php code.

在后端,博客时间就像时钟一样工作。 但是,在前端时,它只是页面加载时的时间戳。 除了管理栏之外,您还可以使用小部件在边栏中显示此内容,并使用php代码将其包含在主题中。

If you want the time to be accurate, then go to Settings » General and edit the Timezone setting. One issue we noticed was that if you select the “city i.e New York”, then it will not adjust with the daylight savings. So in our case, it is showing an hour ahead. However, if you use UTC which doesn’t adjust to daylight savings automatically (meaning you have to change it manually like your wall clocks), you will see the most accurate results.

如果您希望时间准确,请转到设置»常规,然后编辑时区设置。 我们注意到的一个问题是,如果您选择“城市即纽约”,那么它将不会随着夏令时进行调整。 因此,在我们的案例中,它显示了一个小时。 但是,如果您使用的UTC不能自动调整为夏令时(意味着您必须像壁钟一样手动更改),您将看到最准确的结果。

Download Blog Time plugin.

下载Blog Time插件。

翻译自: https://www.wpbeginner.com/plugins/display-time-according-wordpress-blog-admin-bar/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值