Modular Computers the manual GitHub

date

date: print the date and time.

Synopsis

date [+FORMAT]

Description

date prints the date and time by the board’s real-time clock, which keeps the world’s time: the clock files on disks are stamped with.

Dates are the world’s calendar: days are numbered from 1, and a day has 24 of the game’s hours, as Minecraft counts them, so 06:00 is sunrise and 18:00 sunset. The first day’s sunrise is the epoch. A day of the world is 20 minutes of real time.

With no FORMAT, it prints Day 3 14:05:09.

Options

+FORMAT
What to print, as os.date formats it: %d the day, %H %M %S the hour, minute and second, %T all three, %R hours and minutes, %s seconds since the epoch, %c the default, %% a percent sign.

Exit status

0 when it printed; 1 for a format it does not know.

Examples

date
date +%H:%M
date +%s

Notes

GNU date prints the Gregorian calendar’s date, and can set the clock (-s); mcos’s world has no months or years, and its clock is the world’s, which no program sets.

See also

uptime(1)