setUTCMinutes() writes the minute (0–59) on a Date in UTC, with optional seconds and milliseconds. This guide covers syntax, hour snaps, relative minutes, overflow, and comparisons with local setMinutes().
01
Syntax
setUTCMinutes(m)
02
0–59 UTC
Minute hand
03
Overload
m, s, ms
04
+ minutes
getUTCMinutes
05
Overflow
Rolls hours
06
Returns
Epoch ms
Fundamentals
Introduction
Cron jobs, server logs, and ISO timestamps often schedule by UTC clock time. After reading the UTC minute with getUTCMinutes(), setUTCMinutes() writes it back without local timezone offsets.
Like setMinutes(), it mutates the Date and returns epoch milliseconds. Use UTC getters and setters together—do not mix local setMinutes with UTC getUTCMinutes in one step.
Concept
Understanding the setUTCMinutes() Method
Date.prototype.setUTCMinutes(minute [, second [, millisecond]]) accepts a UTC minute and up to two optional sub-minute fields. When you pass only the minute, UTC seconds and milliseconds stay the same unless overflow normalization rolls the UTC clock.
Verify results with toISOString() or UTC getters. For a full UTC time including ms in one call, use setUTCHours(h, m, s, ms).
💡
Beginner Tip
To snap to the top of a UTC hour: date.setUTCMinutes(0, 0, 0). To add fifteen UTC minutes: date.setUTCMinutes(date.getUTCMinutes() + 15).
75 minutes = 1 hour + 15 minutes. The engine normalizes instead of clamping to 0–59.
Applications
🚀 Common Use Cases
UTC cron alignment — snap to setUTCMinutes(0, 0, 0) for hourly jobs.
ISO scheduling — set exact UTC :MM:SS.ms on parsed timestamps.
Relative UTC shifts — postpone with getUTCMinutes() + N.
Log bucketing — group entries by UTC minute for global dashboards.
API deadlines — align server-side cutoff times in UTC.
Clone + mutate — copy a Date before changing UTC minutes.
🧠 How setUTCMinutes() Updates the UTC Clock
1
Read UTC time
Engine loads current UTC hour, minute, and sub-minute fields.
UTC
2
Apply new minute
Minute and optional second/ms replace old UTC values.
setUTCMinutes
3
Normalize overflow
Out-of-range values roll into adjacent UTC hours or days.
Normalize
4
🌐
Mutate & return ms
Date updates in place; epoch milliseconds are returned.
Important
📝 Notes
setUTCMinutes() adjusts the minute hand in UTC (0–59 typical range).
Mutates the original Date—clone with new Date(date) when needed.
Returns epoch ms, not the Date—no fluent chaining on the return value.
Overflow normalizes (minute 75 → next UTC hour + 15 minutes).
Omitting optional args does not reset seconds/ms to zero—only pass them when you intend to change them.
Use setMinutes for local clocks; setUTCMinutes for ISO/server rules.
Compatibility
Browser & Runtime Support
Date.prototype.setUTCMinutes() has been available since ES1. It works in every browser and Node.js.
✓ Baseline · ES1
Date.prototype.setUTCMinutes()
Supported in Chrome, Firefox, Safari, Edge, Internet Explorer, and all Node.js versions. No polyfill required.
99%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.setUTCMinutes()Excellent
Bottom line: Safe everywhere. Remember UTC vs local setters, mutation, and the three-argument snap pattern.
Wrap Up
Conclusion
setUTCMinutes() writes the UTC minute (and optionally seconds and milliseconds) on a JavaScript Date. Use it for ISO-aligned scheduling; use setMinutes() for local wall clocks.
Use setUTCMinutes(0, 0, 0) to snap to the top of a UTC hour
Verify with toISOString() after changes
Pair with getUTCMinutes() for relative shifts
Use the three-arg overload for exact :MM:SS.ms UTC marks
Clone before mutating shared Date instances
❌ Don’t
Mix setUTCMinutes with getMinutes() in one calculation
Chain setters on the numeric return value
Assume values clamp at 59 (overflow rolls hours)
Use local setters for UTC cron rules
Expect seconds to reset when you pass only the minute argument
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Date.setUTCMinutes()
Your foundation for UTC minute writes in JavaScript.
5
Core concepts
📝01
Syntax
setUTCMinutes(m)
API
🌐02
0–59 UTC
Minute hand.
Range
📈03
3 args
m, s, ms.
Overload
➕04
+ minutes
getUTCMinutes.
Pattern
🔄05
Mutates
In place.
Behavior
❓ Frequently Asked Questions
It sets the minutes (0–59) of a Date object in UTC. Optional arguments can also set UTC seconds and milliseconds. The Date mutates in place and returns updated epoch milliseconds.
getUTCMinutes() reads the current UTC minute. setUTCMinutes(m) writes a new UTC minute. They are the read/write pair for the minute hand of the UTC clock.
Yes. setUTCMinutes(minute, second, millisecond) updates all three sub-hour UTC fields at once—useful for snapping to :00:00.000 at the top of a UTC hour.
JavaScript normalizes overflow into the next UTC hour. setUTCMinutes(75) on 12:30 UTC becomes 13:15 UTC (75 minutes = 1 hour + 15 minutes).
No. It returns a number (epoch milliseconds). Call each setter on the same Date variable—do not chain on the return value.
setUTCMinutes() changes the UTC clock minute. setMinutes() changes the local clock minute. Use the one that matches your timezone rules.
Did you know?
setUTCMinutes(0, 0, 0) snaps to HH:00:00.000Z in ISO format—the same instant may show a different local minute in getMinutes() depending on your timezone offset.