JavaScript Date setUTCMinutes() Method

Beginner
⏱️ 8 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
UTC minute 0–59

What You’ll Learn

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

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.

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).

📝 Syntax

JavaScript
dateObj.setUTCMinutes(minute)
dateObj.setUTCMinutes(minute, second)
dateObj.setUTCMinutes(minute, second, millisecond)

Parameters

  • minute — Integer 0–59 in UTC time (overflow normalizes).
  • second (optional) — 0–59 UTC.
  • millisecond (optional) — 0–999 UTC.

Return value

  • Updated epoch milliseconds after the change.
  • NaN if the Date was invalid before the call.

⚡ Quick Reference

GoalCode
Set UTC minute onlydate.setUTCMinutes(30)
Snap to top of UTC hourdate.setUTCMinutes(0, 0, 0)
Add 15 UTC minutesdate.setUTCMinutes(date.getUTCMinutes() + 15)
Set m, s, ms togetherdate.setUTCMinutes(45, 30, 500)
Read UTC minute after setdate.getUTCMinutes()
Local minute setterdate.setMinutes(30)

📋 setUTCMinutes() vs Similar Methods

Pick the setter that matches the time field and timezone you need.

setUTCMinutes()
UTC 0–59

UTC minute

getUTCMinutes()
read

Getter pair

setMinutes()
local 0–59

Local setter

setUTCHours()
h, m, s, ms

Full UTC time

Examples Gallery

Open DevTools Console (F12) or use Try-it links. Examples use Date.UTC() for predictable UTC times.

📚 Getting Started

Change only the UTC minute while keeping hour and seconds.

Example 1 — Set the UTC Minute to 30 (Keep Hour and Seconds)

Start at 12:15:45 UTC and move the minute hand to 30.

JavaScript
const date = new Date(Date.UTC(2026, 2, 1, 12, 15, 45));
date.setUTCMinutes(30);

console.log(date.getUTCHours());    // 12
console.log(date.getUTCMinutes());  // 30
console.log(date.getUTCSeconds());  // 45
console.log(date.toISOString());    // "2026-03-01T12:30:45.000Z"
Try It Yourself

How It Works

Passing one argument updates only the UTC minute. Hour and seconds remain unless normalization rolls the clock.

📈 Practical Patterns

UTC hour snaps, relative minutes, combined fields, and overflow.

Example 2 — Snap to the Top of the UTC Hour (setUTCMinutes(0, 0, 0))

Reset UTC minutes, seconds, and milliseconds to zero while keeping the hour.

JavaScript
const date = new Date(Date.UTC(2026, 2, 1, 14, 37, 22, 800));
date.setUTCMinutes(0, 0, 0);

console.log(date.getUTCHours());           // 14
console.log(date.getUTCMinutes());         // 0
console.log(date.getUTCSeconds());         // 0
console.log(date.getUTCMilliseconds());    // 0
console.log(date.toISOString());           // "2026-03-01T14:00:00.000Z"
Try It Yourself

How It Works

The three-argument form clears sub-minute UTC precision—handy for hourly UTC reports or bucketed analytics.

Example 3 — Add Fifteen UTC Minutes with setUTCMinutes(getUTCMinutes() + 15)

Postpone a UTC deadline by fifteen minutes.

JavaScript
const date = new Date(Date.UTC(2026, 2, 1, 12, 50, 30));
date.setUTCMinutes(date.getUTCMinutes() + 15);

console.log(date.getUTCHours());    // 13
console.log(date.getUTCMinutes());  // 5
console.log(date.getUTCSeconds());  // 30
Try It Yourself

How It Works

12:50 UTC + 15 minutes crosses into the next hour at 13:05 UTC. Use getUTCMinutes(), not getMinutes().

Example 4 — Set UTC Minutes, Seconds, and Milliseconds Together

Use the three-argument overload for an exact sub-hour UTC timestamp.

JavaScript
const date = new Date(Date.UTC(2026, 2, 1, 9, 0, 0, 0));
date.setUTCMinutes(45, 30, 500);

console.log(date.getUTCMinutes());         // 45
console.log(date.getUTCSeconds());         // 30
console.log(date.getUTCMilliseconds());    // 500
console.log(date.toISOString());           // "2026-03-01T09:45:30.500Z"
Try It Yourself

How It Works

When you need a precise :45:30.500 UTC mark, one call beats three separate setters—and the return value is still epoch ms, not the Date.

Example 5 — UTC Minute Overflow (setUTCMinutes(75))

Passing 75 rolls into the next UTC hour at minute 15.

JavaScript
const date = new Date(Date.UTC(2026, 2, 1, 12, 30, 45));
date.setUTCMinutes(75);

console.log(date.getUTCHours());    // 13
console.log(date.getUTCMinutes());  // 15
console.log(date.getUTCSeconds());  // 45
Try It Yourself

How It Works

75 minutes = 1 hour + 15 minutes. The engine normalizes instead of clamping to 0–59.

🚀 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.

📝 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.

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 Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
Date.setUTCMinutes() Excellent

Bottom line: Safe everywhere. Remember UTC vs local setters, mutation, and the three-argument snap pattern.

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.

Next, learn setUTCMonth() to change the UTC month field, or review getUTCMinutes() for reading the UTC minute.

💡 Best Practices

✅ Do

  • 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

Key Takeaways

Knowledge Unlocked

Five things to remember about Date.setUTCMinutes()

Your foundation for UTC minute writes in JavaScript.

5
Core concepts
🌐 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.

Continue to setUTCMonth()

Learn how to set the UTC month field (0–11) on a Date object.

setUTCMonth() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful