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
  • Animating CSS3 Transforms with MooTools Fx
  • 5 Awesome New Mozilla Technologies You’ve Never Heard Of

    5 Awesome New Mozilla Technologies You’ve Never Heard Of

    My trip to Mozilla Summit 2013 was incredible.  I’ve spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out.  MozSummit provided the perfect reminder of how brilliant my colleagues are and how much…

  • MooTools Font-Size Scroller with Cookie Save

    MooTools Font-Size Scroller with Cookie Save

    Providing users as many preferences as possible always puts a smile on the user’s face. One of those important preferences is font size. I can see fine but the next guy may have difficulty with the font size I choose. That’s why…

  • Record Text Selections Using MooTools or jQuery AJAX

    Record Text Selections Using MooTools or jQuery AJAX

    One technique I’m seeing more and more these days (CNNSI.com, for example) is AJAX recording of selected text. It makes sense — if you detect users selecting the terms over and over again, you can probably assume your visitors are searching that term on Google…


Source link
spot_img

Related articles

MSI Afterburner developer adding ‘triple channel voltage’ support for future MSI RTX 50 graphics cards

MSI Afterburner's sole developer, Alexey Nicolaychuk, is working on a new update for the app that will expand...

AMD FSR 4 now available in over 85 games

Delivering incredible graphics without compromising performance remains a priority for gamers and developers alike. Enter AMD FidelityFX™...

US charges suspected ransomware kingpin, and offers $10 million bounty for his capture

A US federal court has unssealed charges against a Ukrainian national who authorities allege was a key figure...