# DynamicBuilders.DynamicInstant

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/DynamicBuilders.java+class:androidx.wear.protolayout.expression.DynamicBuilders.DynamicInstant) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

<br />

```
@RequiresSchemaVersion(major = 1, minor = 200)
interface DynamicBuilders.DynamicInstant : DynamicBuilders.DynamicType
```

<br />

*** ** * ** ***

Interface defining a dynamic time instant type.

`https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` precision is seconds. Thus, any time or duration operation will operate on that precision level.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicDuration` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#durationUntil(androidx.wear.protolayout.expression.DynamicBuilders.DynamicInstant)(to: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant)` Returns duration between the two `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` instances as a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicDuration`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#from(androidx.wear.protolayout.expression.DynamicDataKey<androidx.wear.protolayout.expression.DynamicBuilders.DynamicInstant>)(dynamicDataKey: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant!>)` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` that is bound to the value of an item of the State. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#fromByteArray(byte[])(byteArray: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>)` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from a byte array generated by `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray()`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#fromByteArray(byte[],int,int)(byteArray: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from the provided byte array at the provided offset and length, that was generated by one of the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray()` overloads. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getDayOfMonth(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the day-of-month field from 1 to 31 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getDayOfWeek(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the day-of-week field going from MONDAY (1) to SUNDAY (7) following the ISO-8601 calendar system; As an example, the following is equal to ` DynamicInt32.constant(4)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getHour(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the hour-of-day field from 0 to 23 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(3)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getMinute(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the minute-of-hour field from 0 to 59 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(20)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getMonth(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the month-of-year field from 1 to 12 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getSecond(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the second-of-minute field from 0 to 59 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(10)`: |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#getYear(java.time.ZoneId)(zoneId: https://developer.android.com/reference/java/time/ZoneId.html)` Returns the year field following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1970)`: |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/ConditionScopes.ConditionScope<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant!, https://developer.android.com/reference/java/time/Instant.html!>` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#onCondition(androidx.wear.protolayout.expression.DynamicBuilders.DynamicBool)(condition: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicBool)` Bind the value of this `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` to the result of a conditional expression. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#platformTimeWithSecondsPrecision()()` Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` that updates its value periodically from the system time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray()()` Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into a new byte array that can later be used with `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#fromByteArray(byte[])`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray(byte[])(byteArray: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>)` Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into the provided byte array, returning the amount of bytes written, that can later be used with `DynamicInstant.fromByteArray( byteArray, 0, bytesWritten)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray(byte[],int,int)( byteArray: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with `DynamicInstant.fromByteArray(byteArray, offset, bytesWritten)`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` | `@https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#withSecondsPrecision(java.time.Instant)(instant: https://developer.android.com/reference/java/time/Instant.html)` Creates a constant-valued `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from an `https://developer.android.com/reference/java/time/Instant.html`. |

## Public functions

### durationUntil

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
fun durationUntil(to: DynamicBuilders.DynamicInstant): DynamicBuilders.DynamicDuration
```

Returns duration between the two `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` instances as a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicDuration`. The resulted duration is inclusive of the start instant and exclusive of the end; As an example, the following expression yields a duration object representing 10 seconds:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(10L))
     .durationUntil(DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(20L)));
```

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicDuration` | a new instance of `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicDuration` containing the result of the operation. |

### from

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
java-static fun from(dynamicDataKey: DynamicDataKey<DynamicBuilders.DynamicInstant!>): DynamicBuilders.DynamicInstant
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` that is bound to the value of an item of the State.

| Parameters |
|---|---|
| `dynamicDataKey: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant!>` | The source key to a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicDataBuilders.DynamicDataValue` with an `https://developer.android.com/reference/java/time/Instant.html` value. |

### fromByteArray

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
java-static fun fromByteArray(byteArray: ByteArray<Byte>): DynamicBuilders.DynamicInstant
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from a byte array generated by `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if the byte array does not contain a valid serialization |

### fromByteArray

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
java-static fun fromByteArray(byteArray: ByteArray<Byte>, offset: Int, length: Int): DynamicBuilders.DynamicInstant
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from the provided byte array at the provided offset and length, that was generated by one of the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#toDynamicInstantByteArray()` overloads.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if the byte array does not contain a valid serialization in the provided offset and length |

### getDayOfMonth

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getDayOfMonth(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the day-of-month field from 1 to 31 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getDayOfMonth(ZoneId.of("Europe/London"));
```

### getDayOfWeek

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getDayOfWeek(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the day-of-week field going from MONDAY (1) to SUNDAY (7) following the ISO-8601 calendar system; As an example, the following is equal to ` DynamicInt32.constant(4)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getDayOfWeek(ZoneId.of("Europe/London"));
```

### getHour

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getHour(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the hour-of-day field from 0 to 23 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(3)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getHour(ZoneId.of("Europe/London"));
```

### getMinute

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getMinute(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the minute-of-hour field from 0 to 59 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(20)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getMinute(ZoneId.of("Europe/London"));
```

### getMonth

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getMonth(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the month-of-year field from 1 to 12 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getMonth(ZoneId.of("Europe/London"));
```

### getSecond

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getSecond(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the second-of-minute field from 0 to 59 following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(10)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getSecond(ZoneId.of("Europe/London"));
```

### getYear

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun getYear(zoneId: ZoneId): DynamicBuilders.DynamicInt32
```

Returns the year field following the ISO-8601 calendar system; As an example, the following is equal to `DynamicInt32.constant(1970)`:

```kotlin
  DynamicInstant.withSecondsPrecision(Instant.ofEpochSecond(8410))
     .getYear(ZoneId.of("Europe/London"));
```

### onCondition

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun onCondition(condition: DynamicBuilders.DynamicBool): ConditionScopes.ConditionScope<DynamicBuilders.DynamicInstant!, Instant!>
```

Bind the value of this `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` to the result of a conditional expression. This will use the value given in either `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/ConditionScopes.ConditionScope#use(T)` or `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/ConditionScopes.IfTrueScope#elseUse(T)` depending on the value yielded from ` condition`.

### platformTimeWithSecondsPrecision

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun platformTimeWithSecondsPrecision(): DynamicBuilders.DynamicInstant
```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` that updates its value periodically from the system time.

### toDynamicInstantByteArray

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun toDynamicInstantByteArray(): Array<Byte>
```

Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into a new byte array that can later be used with `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant#fromByteArray(byte[])`.

### toDynamicInstantByteArray

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun toDynamicInstantByteArray(byteArray: ByteArray<Byte>): Int
```

Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into the provided byte array, returning the amount of bytes written, that can later be used with `DynamicInstant.fromByteArray( byteArray, 0, bytesWritten)`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if the byte array is too small |

### toDynamicInstantByteArray

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun toDynamicInstantByteArray(
    byteArray: ByteArray<Byte>,
    offset: Int,
    length: Int
): Int
```

Serializes the `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` into the provided byte array, returning the amount of bytes written, limited by the provided offset and length, that can later be used with `DynamicInstant.fromByteArray(byteArray, offset, bytesWritten)`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if the byte array is too small |

### withSecondsPrecision

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
java-static fun withSecondsPrecision(instant: Instant): DynamicBuilders.DynamicInstant
```

Creates a constant-valued `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInstant` from an `https://developer.android.com/reference/java/time/Instant.html`. If `https://developer.android.com/reference/java/time/Instant.html` precision is greater than seconds, then any excess precision information will be dropped.