如何将Unix时间戳转换为hhmms?

如何将Unix时间戳转换为hhmms?

问题描述:

如何将Unix时间戳(即1286374738)转换为hhmmss?

How to convert Unix timestamp (ie. 1286374738) to hhmmss?

date('His', $timestamp);

其中$ timestamp包含unix时间戳,H =带有零的小时的24小时格式,可以使用h = 12小时格式的一个小时与前导零; i =带前导零的分数,s =秒,前导零

where $timestamp contains the unix timestamp , H = 24-hour format of an hour with leading zeros , can use h = 12-hour format of an hour with leading zeros ; i = Minutes with leading zeros , s = Seconds, with leading zeros