MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 2 | string ctime(int clock) |
| 3 | string ctime(int *uclock) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 5 | DESCRIPTION |
| 6 | Interpret the argument clock as number of seconds since Jan, |
| 7 | 1st, 1970, 0.00 and convert it to a nice date and time string. |
| 8 | If clock is not specified, time() is used as default. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 9 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 10 | The second form is like the first, except that it takes as argument |
| 11 | an array of ints as it is returned from utime(): int[0] is the number |
| 12 | of seconds like before, int[1] is the number of microseconds within |
| 13 | that second. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 14 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 15 | EXAMPLES |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 16 | write(ctime()+"\n"); |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | This will print out something like "Fri Jul 17 19:13:33 1992". |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 19 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 20 | HISTORY |
| 21 | LDMud 3.2.9 introduced the second form. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 22 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 23 | SEE ALSO |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 24 | gmtime(E), localtime(E), mktime(E), strftime(E), time(E), utime(E) |