FutureProg functions
now
Overload 1
now overload 1
DateTime now()
Available in
- computer function
- computer program
- standard futureprog
Returns the current real-world UTC date and time, equivalent to System.DateTime.UtcNow. Use this for real-time expiry or logging rather than in-game calendar time.
This function takes no parameters.
Overload 2
now overload 2
MudDateTime now(Calendar calendar)
Available in
- computer function
- computer program
- standard futureprog
Returns the current in-game date and time for a calendar using the calendar's feed clock and that clock's primary timezone. Returns the special Never mud datetime if the calendar or clock is null.
| Parameter | Type | Description |
|---|---|---|
calendar |
Calendar |
The in-game calendar to use. Its feed clock supplies the time when no clock is specified. |
Overload 3
now overload 3
MudDateTime now(Calendar calendar, Clock clock)
Available in
- computer function
- computer program
- standard futureprog
Returns the current in-game date and time for a calendar and clock using the clock's primary timezone. Returns the special Never mud datetime if the calendar or resolved clock is null.
| Parameter | Type | Description |
|---|---|---|
calendar |
Calendar |
The in-game calendar whose current date is used. |
clock |
Clock |
The in-game clock whose current time is used. If null, the calendar's feed clock is used. |
Overload 4
now overload 4
MudDateTime now(Calendar calendar, Clock clock, Text timezone)
Available in
- computer function
- computer program
- standard futureprog
Returns the current in-game date and time for a calendar and clock, adjusted to the supplied timezone when it matches one of the clock's timezones. Returns the special Never mud datetime if the calendar or resolved clock is null.
| Parameter | Type | Description |
|---|---|---|
calendar |
Calendar |
The in-game calendar whose current date is used. |
clock |
Clock |
The in-game clock whose current time is used. If null, the calendar's feed clock is used. |
timezone |
Text |
Optional timezone alias or ID from the supplied clock. If omitted or invalid, the clock's primary timezone is used. |