time()-24*60*60 对应什么时间? (PHP)

发布于 2024-08-29 19:25:31 字数 72 浏览 4 评论 0原文

对应什么时间

time()-24*60*60 

7天 ?对吗?

What time corresponds to

time()-24*60*60 

7 days? is that right?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夏九 2024-09-05 19:25:31

时间 24 小时 前。

time() 返回当前 Unix 时间戳,即自 Unix Epoch 以来的数。此外,一天有 24 小时,一小时有 60 分钟,一分钟有 60 秒。

time 24 hours ago.

time() returns the current Unix timestamp which is number of seconds since the Unix Epoch. Also there are 24 hours in a day and 60 min in an hour and 60 sec in a min.

破晓 2024-09-05 19:25:31

time() 以秒为单位,因此:

60 * 60 = 3600 seconds (1 hour)
24 * 1 hour = 1 day
24 * 60 * 60 = 1 day

time() works with seconds, so:

60 * 60 = 3600 seconds (1 hour)
24 * 1 hour = 1 day
24 * 60 * 60 = 1 day
孤云独去闲 2024-09-05 19:25:31

事实上一天前。如果你需要 7 天,你就错过了 7 *...

One day ago actually. You're missing a 7 * if you need 7 days...

╭ゆ眷念 2024-09-05 19:25:31

年= 365.3天日= 24小时,小时= 60分钟,分钟= 60秒,还有所有这些秒= 1000毫秒等等。

则需要5天* 24小时= 5 * 24 = 120小时

如果您有5天并且需要几个小时,那么如果您有123小时, 并且需要你做的天数,123h/1day=123/24=5.125days,

这样你就可以去3years=3*365days=1095day=1095*24hours=26280=etc,或者为了更快的计算,你可以做3years=3years*365days*24hours *60分钟*60秒*1000毫秒=大量毫秒

,您可以以其他方式做同样的事情大约5000毫秒=5000毫秒/1000毫秒/60秒/60分钟/24小时/365天=非常小的年数

year=365.3days day=24hours, hour=60minutes, minute=60seconds, and there's all those second=1000milliseconds etc.

if you have 5 days and you need hours then you do 5days*24hours=5*24=120hours

if you have 123hours and need days you do, 123h/1day=123/24=5.125days

so you can go 3years=3*365days=1095day=1095*24hours=26280=etc or for faster calculation you can just do 3years=3years*365days*24hours*60minutes*60seconds*1000milliseconds=big number of milliseconds

and you can do same otherway around 5000milliseconds=5000ms/1000ms/60s/60min/24hours/365days=very small number of years

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文