DateTime(timeZoneId: String? = null)
Constructs a new DateTime object using specified time zone.
If timeZoneId is null, uses the default time zone.
DateTime(calendar: Calendar)
Constructs a new DateTime object based on specified calendar instance.
DateTime(dateTime: DateTime)
Constructs a new DateTime object based on specified dateTime instance.
DateTime(millis: Long, timeZoneId: String? = null)
Constructs a new DateTime object with specified number of milliseconds since epoch.
New DateTime will use time zone with specified timeZoneId, or the default time zone if null.
DateTime(year: Int, month: Int, day: Int, hours: Int = 0, minutes: Int = 0, seconds: Int = 0, milliseconds: Int = 0, timeZoneId: String? = null)
Constructs a new DateTime object with specified year, month and day, and optionally hours, minutes, seconds and milliseconds.
Uses time zone with specified timeZoneId, or the default time zone if null.
protected DateTime(calendar: Calendar, clone: Boolean = false)
DateTime is a thin wrapper around Calendar, designed to simplify the functionality and odd syntax of the latter. It delegates most of its internal functionality to Calendar in a way that maintains the object's immutability.
While DateTime mostly mirrors Calendar in its functionality, it does differ in some aspects - for instance, the first month in DateTime is numbered 1, not zero.