-def set_date(ui, repo, date=None, **opts):
- """Set or query the reference date for this repository.
+def date_cmd(ui, repo, date=None, **opts):
+ """Set or query the date offset for this repository.
-Without any arguments, prints what time the repository currently thinks it is,
-including any offsets which have been configured. Use the `--verbose` options to
-get additional information about the configured offset.
+With the `DATE` argument, configures the repositories date offset so that current time
+is considered as the specified DATE, according to the repository. In otherwords, the offset
+is set to the difference between the current time and the specified DATE. Any date format
+recognized by mercurial itself (as with the `--date` option on the `commit` command) is
+acceptable. Some example formats are "Dec 29 1984 17:55" (local time), "Dec 29 17:55" (current year),
+"Dec 29" (midnight), "17:55" (today), "yesterday" (midnight), "today" (midnight).
-With the DATE argument, configures the repository date offset so that it thinks the
-current date and time is the as given. Standard mercurial date formats work. Useful
-values might be "today", "yesterday", or something of the form "13:41" (1:41 PM today)
-or "Dec 29" (midnight, localtime).
-To remove date offset and get back to real time, just pass the `--clear` option.
+To remove the repository specific offset, pass the `--clear` option without the `DATE` argument.
+Note that this only removes repository-specific offset, any offset applied in user or global config
+files will still apply. To get back to real time regardless of other config files, try `hg date now`.
if "clear" in opts and opts["clear"]:
('c', 'clear', False, "Clear the reference date.",)
- '[options] [--clear | DATE]'
+ '[options] [--clear | DATE]'