maxon.LocalDateTime

Description

At some point developers have to deal with times, dates and timezones.

This topic can promote headaches because it can be quite complex.
In general you have to be aware of differences in timezones, especially when your software runs on mobile devices are you let the user share data across countries (or even within the same country).

The implementation and definition of the classes rely on the ISO 8601.
Use the maxon.UniversalDateTime whenever possible to store normalized time and date values and convert them to a maxon.LocalDateTime instance as late as possible (e.g. for a local string output).

An object representing a local ‘time and date’ of the current system time.
All members are public and are allowed to be modified for custom needs.
Keep in mind that you have to ensure that the values are correct and valid when converting an object back to maxon.UniversalDateTime, otherwise the behavior is undefined.

Inheritance diagram

Inheritance

Parent Class:

Methods Signature

ConvertUniversalDateTime()

Converts the stored time to a Universal Date Time.

FromUnixTimestamp(timestamp)

Create a local date-time object by passing a Unix time stamp.

Methods Definition

LocalDateTime.ConvertUniversalDateTime()

Converts the stored time to a Universal Date Time.

Returns

The universal date-time object.

Return type

maxon.UniversalDateTime

static LocalDateTime.FromUnixTimestamp(timestamp)

Create a local date-time object by passing a Unix time stamp.

Parameters

timestamp (int) – The unix time stamp to be converted.

Returns

The local date-time representation.

Return type

maxon.LocalDateTime