toLocaleTimeString() formats only the clock time of a Date for human readers using locale rules. Use it in chat timestamps, countdown labels, and schedules when the date is already shown elsewhere.
01
Syntax
locales, options
02
Time only
No date
03
timeStyle
Presets
04
hour12
AM/PM vs 24h
05
timeZone
IANA zones
06
Invalid
“Invalid Date”
Fundamentals
Introduction
Apps often show the calendar date in one place and the clock time in another—a message list might read “Mar 15” with “2:30 PM” beside it. toLocaleTimeString() handles that second part with locale-aware formatting through the Intl engine.
For date and time together, use toLocaleString(). For date only, use toLocaleDateString(). For a quick fixed-pattern local time string, compare with toTimeString() (covered when you reach toString() family formatters).
Concept
Understanding the toLocaleTimeString() Method
Date.prototype.toLocaleTimeString([locales[, options]]) returns a localized string containing only the time portion of a Date instant:
Default — date.toLocaleTimeString() uses the runtime locale and a short time style.
Granular fields — hour, minute, second, plus hour12.
timeZone — display the instant as clock time in a specific IANA zone.
💡
Beginner Tip
toLocaleTimeString() never includes the calendar date. If your UI needs both, call toLocaleDateString() and toLocaleTimeString() separately—or use one toLocaleString() call.
Foundation
📝 Syntax
JavaScript
dateObj.toLocaleTimeString([locales[, options]])
Parameters
locales (optional) — string or array of BCP 47 locale tags.
options (optional) — Intl time fields, timeStyle, or timeZone.
The stored instant is unchanged—only the displayed clock shifts with the zone. Store ISO; format with timeZone when rendering.
Applications
🚀 Common Use Cases
Chat timestamps — compact timeStyle: 'short' beside each message.
Office hours — show support desk times in the user’s timeZone.
Media players — current playback position as locale time labels.
Calendar grids — time column when the date header is separate.
Countdown follow-ups — “Reminder at 3:00 PM” in the visitor’s locale.
Flight dashboards — departure clock in origin airport zone.
🧠 How toLocaleTimeString() Builds the Label
1
Resolve locale
Engine picks the BCP 47 tag from the argument or runtime default.
locale
2
Apply time zone
Local zone or timeZone option sets hour, minute, and second fields.
TZ
3
Intl formatting
Options or timeStyle map to Intl time parts only.
Intl
4
🕓
Return string
A localized time label is returned; the Date object is unchanged.
Important
📝 Notes
Time only—no calendar date in the output.
Read-only: does not mutate the Date.
Output varies by locale, options, and time zone—do not parse it back to dates in production.
Store ISO or epoch; format with toLocaleTimeString() at display time.
Invalid dates return "Invalid Date".
Avoid mixing timeStyle with conflicting granular field options in one call.
Compatibility
Browser & Runtime Support
Date.prototype.toLocaleTimeString() with locales and options is widely supported via Intl in modern environments.
✓ Baseline · Intl
Date.prototype.toLocaleTimeString()
Supported in Chrome, Firefox, Safari, Edge, and Node.js. Very old browsers had limited locale support; target modern baselines for rich options.
98%Universal API
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
Date.toLocaleTimeString()Excellent
Bottom line: Safe for modern apps. Remember time-only scope, locale variance, and ISO for storage.
Wrap Up
Conclusion
toLocaleTimeString() is the right tool when users need readable clock labels without repeating the calendar date. Combine locales, timeStyle, hour12, and timeZone to match regional expectations.
Next, learn toString() for the default string representation of a Date, or review toLocaleString() for combined date-and-time labels.
Use timeStyle: 'short' for compact message timestamps
Set timeZone when showing remote office hours
Pass explicit locales when your app supports language switching
Set hour12 when your UI requires a fixed clock style
Pair with toLocaleDateString() when date and time sit in separate columns
❌ Don’t
Expect calendar date text from toLocaleTimeString()
Parse locale time strings back to Date objects with regex
Store locale-formatted time strings as your source of truth
Mix timeStyle with conflicting field options in one call
Use locale time strings in API payloads instead of ISO
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Date.toLocaleTimeString()
Your foundation for locale-aware clock labels in JavaScript.
5
Core concepts
📝01
Syntax
locales + options
API
🕓02
Time only
No date.
Scope
📋03
timeStyle
short/medium.
Presets
🕐04
hour12
AM/PM vs 24h.
Clock
🌐05
timeZone
IANA names.
Regions
❓ Frequently Asked Questions
A string with only the time portion of the Date formatted for a locale — for example, "2:30:00 PM" in en-US or "14:30:00" in de-DE. The calendar date is not included.
toLocaleTimeString() formats clock time only. toLocaleString() includes both date and time. Pair toLocaleDateString() + toLocaleTimeString() when you want separate UI columns.
Pass hour12: false in the options object, or use a locale that defaults to 24-hour time such as de-DE with timeStyle presets.
Yes. Set timeZone in options — for example, { timeZone: 'Europe/London' } — to display the instant as it appears in that zone.
Common options include timeStyle ('full', 'long', 'medium', 'short'), hour, minute, second, hour12, and timeZone. Do not mix timeStyle with conflicting granular fields in one call.
It returns the string "Invalid Date". Validate with Number.isNaN(date.getTime()) before formatting in UI code.
Did you know?
toLocaleString() is implemented as date plus time formatting—internally similar to calling locale date and time formatters together. When you only need one half, dedicated methods avoid redundant text.