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

New Atomic macOS Stealer Campaign Exploits ClickFix to Target Apple Users

Cybersecurity researchers are alerting to a new malware campaign that employs the ClickFix social engineering tactic to trick...

Steam Deck internals crammed inside an Apple Magic Keyboard create a portable gaming PC

Since the console's release, we have seen some spectacular Steam Deck mods, including the "Steam Brick" and the...

Suikoden HD Remaster Physical Edition Is Only $30 For A Limited Time

Amazon still lists the Nintendo Switch version as the Day One Edition, but the PS5 and Xbox Series...