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

Event Technology Stack For Large Flagship Events

Planning a flagship conference is no longer just about picking great venues and designing compelling agendas. It’s...

Apple iOS 26 public beta arrives

Apple released the first public beta of its new mobile operating system, iOS 26, featuring its “Liquid Glass”...

CPU performance optimization guide – part 4

Introduction Hello! We assume, by default, that you have already read the Preface to the CPU Performance Optimization...