How to Set Date Time from Mac Command Line

Date:

Share post:

Working on a web extension that ships to an app store and isn’t immediately modifiable, like a website, can be difficult. Since you cannot immediately deploy updates, you sometimes need to bake in hardcoded date-based logic. Testing future dates can be difficult if you don’t know how to quickly change the date on your local machine.

To change the current date on your Mac, execute the following from command line:

# Date Format:  MMDDYYYY
sudo date -I 06142024

This command does not modify time, only the current date. Using the same command to reset to current date is easy as well!

Request Metrics real user monitoring
Request Metrics real user monitoring
Request Metrics real user monitoring
  • Create Spinning Rays with CSS3: Revisited
  • 7 Essential JavaScript Functions

    7 Essential JavaScript Functions

    I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener and attachEvent.  Times have changed but there are still a few functions each developer should…

  • Create a CSS Flipping Animation

    Create a CSS Flipping Animation

    CSS animations are a lot of fun; the beauty of them is that through many simple properties, you can create anything from an elegant fade in to a WTF-Pixar-would-be-proud effect. One CSS effect somewhere in between is the CSS flip effect, whereby there’s…

  • Page Peel Effect Using MooTools

Source link
spot_img

Related articles

Notch Goes Gold at ISE 2026

For the last decade, Notch has powered the world’s most ambitious live events — stadium tours,...

My favorite musical discoveries of 2025

I listen to a lot of music, it's a constant accompaniment to my work and ...

Dungeon Crawler Carl toymaker Playmates teases Samantha plans at Toy Fair

In the post-apocalyptic world of Dungeon Crawler Carl, all of Earth’s resources have been used up by the...