Skip to content

GetTimestampTime

imshooter edited this page Nov 26, 2026 · 1 revision

The time of day of a time.

native bool:GetTimestampTime(Timestamp:timestamp, &hour, &minute, &second, const zone[] = "");

Parameters

Parameter Description
Timestamp:timestamp The time.
&hour The hour, 0 to 23.
&minute The minute.
&second The second.
const zone[] The time zone, as "UTC", or the zone of the server when left out.

Returns

  • true when it was read.
  • false when there is no such zone.

Example

stock bool:IsNight() {
    new
        hour,
        minute,
        second
    ;

    GetTimestampTime(Now(), hour, minute, second);

    return hour >= 22 || hour < 6;
}

Related

Clone this wiki locally