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

Years of JSONFormatter and CodeBeautify Leaks Expose Thousands of Passwords and API Keys

Nov 25, 2025Ravie LakshmananData Exposure / Cloud Security New research has found that organizations in various sensitive sectors, including...

Pay for Apple TV+ Annually to Avoid the Recent Monthly Price Increase

Apple has raised the monthly subscription fee for Apple TV+ to $12.99, marking the third price increase since...

Fragments Nov 19

I’ve been on the road in Europe for the last couple of weeks, and while I was there...