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

The Solidity Language open-source package was used in a $500,000 crypto heist

Attacks that leverage malicious open-source packages are becoming a major and growing threat. This type of attacks currently...

RTX 6000 Pro Blackwell

RTX 6000 Pro – Unmatched Performance for Professionals NVIDIA has once again raised the bar for professional graphics with...

Rapid CV Evaluation at Job Fairs: Methods and Technology

Efficiency in candidate analysis at recruitment events has become a critical factor for companies’ success in today’s market....