Repository navigation
TimeFormat
imshooter edited this page Nov 26, 2026
·
1 revision
Write a time as text.
native bool:TimeFormat(Timestamp:timestamp, const format[], output[], size = sizeof (output), const zone[] = "");| Parameter | Description |
|---|---|
Timestamp:timestamp |
The time. |
const format[] |
The text, with the specifiers in Specifiers. |
output[] |
Array for the text. |
size |
Size of the array. |
const zone[] |
The time zone, as "UTC", or the zone of the server when left out. |
-
truewhen it was written. -
falsewhen the format has a specifier it does not know, or there is no such zone.
Names of days and months are always in English. A text longer than the array is cut to fit.
stock ShowServerTime(playerid) {
new
text[32]
;
TimeFormat(Now(), "%H:%M on %A", text);
SendClientMessage(playerid, -1, "It is %s.", text);
}- TimeParse: Read a time from text.
- DurationFormat: Write a duration as text.
Chrono 0.2.0 · Repository · Releases · MIT License
Guides
Reference
Functions