'
' Small program to calculate date of boot when 'uptime' shows <x> days
'
' PvE - GPL.
'-------------------------------------------------------------------------------------------------------------
' Get the separate arguments
SPLIT ARGUMENT$ BY " " TO arg$ SIZE dim
IF dim < 2 THEN
PRINT "Usage: bootime <days>"
END
ENDIF
' Get the days in seconds
bootime = NOW - VAL(arg$[1]) * 24 * 60 * 60
' Print result
PRINT "System booted on ", WEEKDAY$(bootime), " ", MONTH$(bootime), " ", DAY(bootime), ", ", YEAR(bootime)