Introduction / Why This Matters
Correct system date and time are critical for macOS functionality. They are used in:
- Networking and security: SSL/TLS certificates, authentication, event logs.
- Data synchronization: Cloud services (iCloud, Dropbox), Calendar, Reminders.
- Automation: Scheduled tasks (cron, launchd), backups.
- Debugging: Log analysis and file history.
If the time on your Mac is incorrect, you may encounter errors accessing websites, synchronization issues, or malfunctioning automated scripts. This guide will show you how to configure date and time correctly.
Requirements / Preparation
- Operating system: macOS 13 Ventura or newer (the System Settings interface may differ in older versions, but terminal commands work on most versions).
- Access permissions: Changing system settings via the graphical interface requires administrator privileges (enter password when prompted). Commands in the terminal using
sudoalso require an administrator password. - Internet connection: Required for automatic time synchronization (NTP) and for using time servers.
Step 1: Configuration via Graphical Interface (System Settings)
This is the primary and simplest method for most users.
- Go to the Apple (ο£Ώ) menu β System Settings (or via Launchpad).
- In the sidebar, select the "General" section.
- Click on "Date & Time".
- You will see the current settings:
- Time Zone: Click "Time Zone" to set your region and city. macOS will automatically detect the current time zone and daylight saving time.
- Date & Time: If the "Set date and time automatically" toggle is active, the time will sync with Apple's internet server. You can select a specific server by clicking on
time.apple.com. - If the toggle is disabled, you can manually set the date and time by clicking on the current values in the preview window.
π‘ Tip: For most users, leaving "Set date and time automatically" enabled is sufficient. This ensures accurate time without manual intervention.
Step 2: Configuration via Terminal (for Automation and Diagnostics)
The Terminal provides full control and is useful for automation scenarios or if the graphical interface is not working.
- Open the Terminal app (via Launchpad or Finder β Applications β Utilities).
- Use the
systemsetuputility. Here are the main commands:
View current settings:
systemsetup -gettimezone
systemsetup -getusingnetworktime
date # Shows current system time
Set time zone:
# First, list available zones
sudo systemsetup -listtimezones
# Set the desired one (e.g., for Moscow)
sudo systemsetup -settimezone Europe/Moscow
Enable/disable auto-sync (NTP):
sudo systemsetup -setusingnetworktime on # Enable
sudo systemsetup -setusingnetworktime off # Disable
Manually set date and time (format: "DD MM YYYY HH:MM:SS"):
# Example: set to February 15, 2026, 14:30:00
sudo systemsetup -setdate "15.02.2026 14:30:00"
β οΈ Important: Commands that change system settings require
sudoand an administrator password. Be careful with the date format.
Step 3: Forced Synchronization and NTP Check
If the time has "drifted" (e.g., after a long period without internet), you can sync it manually.
- Ensure auto-sync is enabled (
sudo systemsetup -setusingnetworktime on). - Perform a forced request to Apple's time server:
This command synchronizes the time immediately. Thesudo sntp -sS time.apple.com-sSflag suppresses extra output. - Check the result:
date
Additionally: If you want to use a different public NTP server (e.g., pool.ntp.org), change the setting:
sudo systemsetup -setnetworktimeserver pool.ntp.org
Step 4: Troubleshooting Common Issues
If settings are not applied or time resets, check the following:
- No internet: NTP cannot function without a connection. Check network settings.
- Firewall blocking: Ensure outgoing UDP packets on port 123 (NTP) are not blocked.
- Incorrect time zone: Set the correct region in settings or via
systemsetup -settimezone. - Hardware time (RTC) issues: If time resets when shutting down your Mac, it could indicate a failing CMOS battery (rare on Macs, more common on PCs). Try resetting NVRAM/PRAM and SMC (instructions vary by Mac model).
- Conflicting configuration profiles (MDM): If your Mac is managed by a company, time settings might have been locked by a profile. Contact your system administrator.
Verification
After applying settings, ensure the time is correct:
- Visually: Look at the time in the menu bar (top right). It should match your region.
- Via Terminal: Run the
datecommand. The output should show the current date and time, along with the correct time zone abbreviation (e.g.,MSKfor Moscow). - Sync check: Run
sudo systemsetup -getusingnetworktime. The responseNetwork Time: Onconfirms NTP is active. - Logs: If in doubt, check system logs in Console.app for messages from
timedorntpd.
Potential Problems
- Error
sudo: systemsetup: command not found: Thesystemsetuputility is included with macOS by default. If the command is not found, your PATH might be misconfigured. Run it by its full path:/usr/sbin/systemsetup. - Cannot change time zone via terminal: Ensure you are using the correct zone identifier from the
sudo systemsetup -listtimezoneslist (e.g.,Europe/Moscow, not justMoscow). - Time continues to "drift" even with NTP enabled: This could indicate a failing hardware real-time clock (RTC) module or severe overheating. Try restarting your Mac. If the problem persists, contact Apple Support.
- Cannot reach time server: Try changing the server to
time.apple.comor the publicpool.ntp.org. Check network connectivity and firewall settings. - Settings reset after reboot: Check if they are being set from a configuration profile (MDM) as "read-only." Also, ensure you are applying changes by clicking the "Lock" button (if present) or simply closing the settings window after making edits.