Sdílet prostřednictvím


Time.SetJulianDay(Int32) Method

Definition

Sets the time from the given Julian day number, which must be based on the same timezone that is set in this Time object.

[Android.Runtime.Register("setJulianDay", "(I)J", "GetSetJulianDay_IHandler")]
public virtual long SetJulianDay (int julianDay);
[<Android.Runtime.Register("setJulianDay", "(I)J", "GetSetJulianDay_IHandler")>]
abstract member SetJulianDay : int -> int64
override this.SetJulianDay : int -> int64

Parameters

julianDay
Int32

the Julian day in the timezone for this Time object

Returns

the UTC milliseconds for the beginning of the Julian day

Attributes

Remarks

Sets the time from the given Julian day number, which must be based on the same timezone that is set in this Time object. The "gmtoff" field need not be initialized because the given Julian day may have a different GMT offset than whatever is currently stored in this Time object anyway. After this method returns all the fields will be normalized and the time will be set to 12am at the beginning of the given Julian day.

The only exception to this is if 12am does not exist for that day because of daylight saving time. For example, Cairo, Eqypt moves time ahead one hour at 12am on April 25, 2008 and there are a few other places that also change daylight saving time at 12am. In those cases, the time will be set to 1am.

Java documentation for android.text.format.Time.setJulianDay(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to