草庐IT

iTimeElapsed

全部标签

php - 日期/时间转换为自 php 以来的时间

你好在我的数据库中日期/时间都是这种格式2010-06-01T18:20:25+0000我想回显自该日期/时间以来耗时例如4天3小时36分4秒这可能吗? 最佳答案 下面是我为此编写的一个函数。请随意使用它。/***Returnsrough(inlargestsingleunit)timeelapsedbetweentwotimes.*@paramint$iTime0Initialtime,astime_t.*@paramint$iTime1Finaltime,astime_t.0=usecurrenttime.*@returnstr