Interaction With The Operating System >

# Local and Universal Time

The following methods and system global variables provide access to the system's time.

These methods are available in 3ds Max 2008 and higher.

They were previously available in the Avguard Extensions.

    getLocalTime()
    getUniversalTime()

Return the Local respectively the Coordinated Universal Time (UTC) as an 8 element array.

Array elements are:

1. Year- Specifies the current year.
2. Month- Specifies the current month; January = 1, February = 2, and so on.
3. DayOfWeek- Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.
4. Day- Specifies the current day of the month.
5. Hour- Specifies the current hour.
6. Minute- Specifies the current minute.
7. Second- Specifies the current second.
8. Milliseconds- Specifies the current millisecond.

    localTime

This system global variable contains a String value that defines the current local date and time. This variable is read-only. An example of the value stored in localtime is:

    s = localTime
    --> "4/14/97 10:24:57 AM"

The format of this string is controlled by the date format selected in the main Windows Regional Settings control panel.