如何在PHP中以分钟为单位获得时差 [英] How to get time difference in minutes in PHP
本文介绍了如何在PHP中以分钟为单位获得时差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 PHP 中计算两个日期时间之间的分钟差?
How to calculate minute difference between two date-times in PHP?
推荐答案
从未来最多减去过去最多 1 并除以 60.
Subtract the past most one from the future most one and divide by 60.
时间以 Unix 格式完成,因此它们只是一个大数字,显示从 1970 年 1 月 1 日,格林威治标准时间 00:00:00 开始的秒数
Times are done in Unix format so they're just a big number showing the number of seconds from January 1, 1970, 00:00:00 GMT
这篇关于如何在PHP中以分钟为单位获得时差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文