LocalTime.Now Method

Definition

Overloads

Name Description
Now()
Now(ZoneId)

Obtains the current time from the system clock in the specified time-zone.

Now(Clock)

Obtains the current time from the specified clock.

Now()

[Android.Runtime.Register("now", "()Ljava/time/LocalTime;", "", ApiSince=26)]
public static Java.Time.LocalTime? Now();
[<Android.Runtime.Register("now", "()Ljava/time/LocalTime;", "", ApiSince=26)>]
static member Now : unit -> Java.Time.LocalTime

Returns

Attributes

Applies to

Now(ZoneId)

Obtains the current time from the system clock in the specified time-zone.

[Android.Runtime.Register("now", "(Ljava/time/ZoneId;)Ljava/time/LocalTime;", "", ApiSince=26)]
public static Java.Time.LocalTime? Now(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("now", "(Ljava/time/ZoneId;)Ljava/time/LocalTime;", "", ApiSince=26)>]
static member Now : Java.Time.ZoneId -> Java.Time.LocalTime

Parameters

zone
ZoneId

the zone ID to use, not null

Returns

the current time using the system clock, not null

Attributes

Remarks

To be added.

Java reference for java.time.LocalTime.now.

Applies to

Now(Clock)

Obtains the current time from the specified clock.

[Android.Runtime.Register("now", "(Ljava/time/Clock;)Ljava/time/LocalTime;", "", ApiSince=26)]
public static Java.Time.LocalTime? Now(Java.Time.Clock? clock);
[<Android.Runtime.Register("now", "(Ljava/time/Clock;)Ljava/time/LocalTime;", "", ApiSince=26)>]
static member Now : Java.Time.Clock -> Java.Time.LocalTime

Parameters

clock
Clock

the clock to use, not null

Returns

the current time, not null

Attributes

Remarks

Obtains the current time from the specified clock. This will query the specified clock to obtain the current time. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using dependency injection.

Java reference for java.time.LocalTime.now.

Applies to