Menu

1 / 4

How to Set Date Time from Mac Command Line

#davidwalsh#date#current#command#gradients
Reading 0:00
15s threshold

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!

Recent Features

CSS Gradients

With CSS border-radius , I showed you how CSS can bridge the gap between design and development by adding rounded corners to elements. CSS gradients are another step in that direction.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.