标签: php time
office timing : 10:00 to 19:00.
如果记录了呼叫并且有人参加,我希望仅在考虑办公时间的情况下找到记录和操作之间的时差。 就像在18:00记录了一个电话,并且第二天11:00有来电时,总时间应为2hrs rather than 17hrs ..
18:00
11:00
2hrs rather than 17hrs
我尝试使用time()功能,但我能做的就是找不同办公时间。 任何人都可以给我一个提示或什么?... Thnx提前!! :)
time()
答案 0 :(得分:0)
Here你有函数示例,它只会在办公时间计算差异:
$from = '2013-12-30 18:00:00 UTC'; $to = '2013-12-31 11:00:00 UTC'; echo some_func_name($from, $to); # 2 hours
demo