Share via


ZipEntry.TimeLocal Property

Definition

Returns the last modification time of the entry in local date-time. -or- Sets the last modification time of the entry in local date-time.

public virtual Java.Time.LocalDateTime? TimeLocal { [Android.Runtime.Register("getTimeLocal", "()Ljava/time/LocalDateTime;", "GetGetTimeLocalHandler", ApiSince=35)] get; [Android.Runtime.Register("setTimeLocal", "(Ljava/time/LocalDateTime;)V", "GetSetTimeLocal_Ljava_time_LocalDateTime_Handler", ApiSince=35)] set; }
[<get: Android.Runtime.Register("getTimeLocal", "()Ljava/time/LocalDateTime;", "GetGetTimeLocalHandler", ApiSince=35)>]
[<set: Android.Runtime.Register("setTimeLocal", "(Ljava/time/LocalDateTime;)V", "GetSetTimeLocal_Ljava_time_LocalDateTime_Handler", ApiSince=35)>]
member this.TimeLocal : Java.Time.LocalDateTime with get, set

Property Value

The last modification time of the entry in local date-time

Attributes

Remarks

Property getter documentation:

Returns the last modification time of the entry in local date-time.

If the entry is read from a ZIP file or ZIP file formatted input stream, this is the last modification time from the zip file entry's optional extra data if the extended timestamp fields are present. Otherwise, the last modification time is read from entry's standard MS-DOS formatted date and time fields.

The java.time.ZoneId#systemDefault() system default TimeZone is used to convert the UTC time to local date-time.

Added in 9.

Java documentation for java.util.zip.ZipEntry.getTimeLocal().

Property setter documentation:

Sets the last modification time of the entry in local date-time.

If the entry is output to a ZIP file or ZIP file formatted output stream the last modification time set by this method will be stored into the date and time fields of the zip file entry and encoded in standard MS-DOS date and time format. If the date-time set is out of the range of the standard MS-DOS date and time format, the time will also be stored into zip file entry's extended timestamp fields in optional extra data in UTC time. The java.time.ZoneId#systemDefault() system default TimeZone is used to convert the local date-time to UTC time.

LocalDateTime uses a precision of nanoseconds, whereas this class uses a precision of milliseconds. The conversion will truncate any excess precision information as though the amount in nanoseconds was subject to integer division by one million.

Added in 9.

Java documentation for java.util.zip.ZipEntry.setTimeLocal(java.time.LocalDateTime).

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