Date (Unix command): Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Expand section}}
GelvinM (talk | contribs)
Line 3:
-->{{Article for deletion/dated|page=Date (Unix command)|timestamp=20250426150027|year=2025|month=April|day=26|substed=yes}}
<!-- Once discussion is closed, please place on talk page: {{Old AfD multi|page=Date (Unix command)|date=26 April 2025|result='''keep'''}} -->
<!-- End of AfD message, feel free to edit beyond this point -->
<!-- End of AfD message, feel free to edit beyond this point -->The date command outputs the current or specified date and time and can also set the current system time. While available as a command line utility it is also used in [[Shell script|shell scripts]] to perform automated actions such as calculating the difference between different times, converting times between timezones, reformating timstamps in texts to fit different [[List of date formats by country|date presentation requirements]] and adding versioning information to backup and other files.<ref>{{cite book|last1=Nemeth|first1=Evi |last2=Snyder| first2=Garth |last3=Hein| first3=Trent | last4=Whaley| first4=Ben| title=UNIX and Linux System Administration Handbook| edition=4th | publisher=Prentice Hall|___location=New York|year=2011| isbn=978-0131-48005-6| pages=45,398}}</ref><ref>{{cite web| author=<!-- not stated --> | title=Formatting and Displaying Dates with Bash Scripts in Linux|date=Oct 22, 2023| url=https://www.squash.io/formatting-and-displaying-dates-with-bash-scripts-in-linux/ | website=www.squash.io| publisher=Squash Labs Inc|___location=Vancouver BC| access-date=Apr 28, 2025}}</ref>
 
==Option flags==
Line 56 ⟶ 57:
===Multics===
[[Multics]] was a multi-user operating system from [[Honeywell]] that was a major inspiration for Unix. It had the following time and date related active functions which could be entered either directly on the command line or embedded in other commands using square brackets: '''date''', '''time''', '''date_time''', '''year''', '''month''' (number), '''month_name''', '''day '''(number), '''day_name''', '''hour''', '''minute'''.<ref>{{cite web| author=<!-- not stated --> | title=Multics Pocket Guide: Commands and Active Functions| date=April 1980 | url=https://multicians.org/multics-commands.html | website=www.bitsavers.org | publisher=Honeywelll|access-date=May 1, 2025}}</ref>
 
===MPE===
[[MPE]] was an operating system that ran on HP 1000 and 3000 minicomputers. The command to display the date and time were '''SHOWTIME''' and '''SHOWCLOCK'''. The latter command added the time zone offset from GMT and a "correction" factor reflecting previous manual adjustments due to [[Clock drift|clock drift]]. Neither had any options.<ref>{{cite web |author=<!-- not stated --> | title=MPE/iX Commands Reference manual Volume I: SHOWCLOCK | url=http://www.3kranger.com/HP3000/mpeix/doc3k/B3265090819.11741/200.htm | publisher=Hewlett Packard | access-date=May 1, 2025}}</ref><ref>{{cite web | author=<!-- not stated --> | title=MPE/iX Commands Reference manual Volume I: SHOWTIME | url=http://www.3kranger.com/HP3000/mpeix/doc3k/B3265090819.11741/211.htm
| publisher=Hewlett Packard | access-date=May 1, 2025}}</ref>
 
To reset both values '''SETCLOCK''' had named parameters '''DATE'''=''mm/dd/yy[yy]'' , '''TIME'''=''hh:mm[:ss]'' and '''CORRECTION'''=''offset in seconds''. and '''TIMEZONE'''. Two additional parameters '''NOW''' or '''GRADUAL''' indicated either the change should be immediate or that the system clock should either speed up or slow down to reach the specified new time. <ref>{{cite web |author=<!-- not stated --> | title=MPE/iX Commands Reference manual Volume I: SETTIME | url=http://www.3kranger.com/HP3000/mpeix/doc3k/B3265090819.11741/191.htm
| publisher=Hewlett Packard | access-date=May 1, 2025}}</ref>
 
 
{{Expand section|date=May 2025|further OS/shell examples}}