Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The toTimeString() method of Date instances returns a string representing the time portion of this date interpreted in the local timezone.
None.
A string representing the time portion of the given date (see description for the format). Returns "Invalid Date" if the date is invalid.
Date instances refer to a specific point in time. toTimeString() interprets the date in the local timezone and formats the time part in English. It always uses the format of HH:mm:ss GMT±xxxx (TZ), where:
| HH | Hour, as two digits with leading zero if required |
| mm | Minute, as two digits with leading zero if required |
| ss | Seconds, as two digits with leading zero if required |
| ±xxxx | The local timezone's offset — two digits for hours and two digits for minutes (e.g., -0500, +0800) |
| TZ | The timezone's name (e.g., PDT, PST) |
For example: "04:42:04 GMT+0000 (Coordinated Universal Time)".
| ECMAScript® 2027 Language Specification # sec-date.prototype.totimestring |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 10, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.