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
  • 9 More Mind-Blowing WebGL Demos
  • LightFace:  Facebook Lightbox for MooTools

    LightFace: Facebook Lightbox for MooTools

    One of the web components I’ve always loved has been Facebook’s modal dialog.  This “lightbox” isn’t like others:  no dark overlay, no obnoxious animating to size, and it doesn’t try to do “too much.”  With Facebook’s dialog in mind, I’ve created LightFace:  a Facebook lightbox…

  • Styling CSS Print Page Breaks

    Styling CSS Print Page Breaks

    It’s important to construct your websites in a fashion that lends well to print. I use a page-break CSS class on my websites to tell the browser to insert a page break at strategic points on the page. During the development of my…

  • CSS Ellipsis Beginning of String

    CSS Ellipsis Beginning of String

    I was incredibly happy when CSS text-overflow: ellipsis (married with fixed width and overflow: hidden was introduced to the CSS spec and browsers; the feature allowed us to stop trying to marry JavaScript width calculation with string width calculation and truncation.  CSS ellipsis was also very friendly to…


Source link
spot_img

Related articles

Hacker suspected of trying to cheat his way into university is arrested in Spain

Spanish police have arrested a suspected hacker for accessing a government website in order to alter the high...

Samsung Galaxy S25 Edge Trims Fat For A Sleek, Slim AI-Powered Smartphone

Samsung's Galaxy S25 range of flagship phones is now complete,...

7 Tactics for Connecting Investors with Opportunities

Finance event stakeholders are in the business of making, managing, and growing capital. At the same time, fintech...

Why Investing in Professional Website Development Pays Off: Key Benefits for Your Business

Hey there! Let’s talk about something crucial for your business: your website. Think of it as your digital...