# How to Set Date Time from Mac Command Line

DevFeed: [How to Set Date Time from Mac Command Line](<https://devfeed.tech/articles/how-to-set-date-time-from-mac-command-line-37488.md>)

Original publisher: [Read original article](<https://davidwalsh.name/mac-set-date>)

Author: David Walsh

Published: 2024-06-17T12:01:38Z

Content type: tutorial

Language: en

Sources: [David Walsh](<https://devfeed.tech/sources/david-walsh.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [extension](<https://devfeed.tech/tags/extension.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [mac](<https://devfeed.tech/tags/mac.md>), [quick-tips](<https://devfeed.tech/tags/quick-tips.md>), [quick-tips-shell](<https://devfeed.tech/tags/quick-tips-shell.md>), [shell](<https://devfeed.tech/tags/shell.md>), [testing](<https://devfeed.tech/tags/testing.md>), [time](<https://devfeed.tech/tags/time.md>)

## AI overview

This tutorial explains how to change the current date on a Mac from the command line so developers can test hardcoded, date-based logic in web extensions that cannot be updated immediately.

## Source excerpt

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 [...] The post How to Set Date Time from Mac Command Line appeared first on David Walsh Blog.