Skip to content

MakeTimestamp

imshooter edited this page Nov 26, 2026 · 1 revision

The time of a date.

native Timestamp:MakeTimestamp(year, month, day, hour = 0, minute = 0, second = 0, const zone[] = "");

Parameters

Parameter Description
year The year.
month The month.
day The day of the month.
hour The hour.
minute The minute.
second The second.
const zone[] The time zone, as "UTC", or the zone of the server when left out.

Returns

The time, or INVALID_TIMESTAMP when it does not fit a Timestamp or there is no such zone.

Remarks

A value past its range carries over, so day 0 is the last day of the month before and month 13 is January of the next year. A time the clocks skip or repeat is taken as the earliest it can be.

Example

stock Timestamp:NextMidnight() {
    new
        year,
        month,
        day
    ;

    GetTimestampDate(Now(), year, month, day);

    return MakeTimestamp(year, month, day + 1);
}

Related

Clone this wiki locally