 <p><code>160000</code> is not a timestamp in any way that PHP (or other common systems) define a timestamp. What you have is merely a time of day expressed in "military time" stored as an integer. So first of all, any <code>gm</code> function is likely not what you want to use, since you are missing timezone information from this "timestamp" to begin with, hence conversion to GM time is ambiguous if not impossible.</p> <p>The best you may be able to do is:</p> <pre><code>$timestamp = DateTime::createFromFormat('His', sprintf('%06d', 160000))-&gt;format('U'); echo strftime('%H:%M', $timestamp); </code></pre>