You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -503,11 +503,11 @@ Due to the zip file specification having lackluster support for specifying times
503
503
there are several third-party extensions that add better support.
504
504
yauzl supports these encodings:
505
505
506
-
1.InfoZIP "universal timestamp" extended field (`0x5455` aka `"UT"`): signed 32-bit seconds since `1970-01-01 00:00:00Z`, which supports the years 1901-2038 (partially inclusive) with 1-second precision. The value is timezone agnostic, i.e. always UTC.
506
+
1.Info-ZIP "universal timestamp" extended field (`0x5455` aka `"UT"`): signed 32-bit seconds since `1970-01-01 00:00:00Z`, which supports the years 1901-2038 (partially inclusive) with 1-second precision. The value is timezone agnostic, i.e. always UTC.
507
507
2. NTFS extended field (`0x000a`): 64-bit signed 100-nanoseconds since `1601-01-01 00:00:00Z`, which supports the approximate years 20,000BCE-20,000CE with precision rounded to 1-millisecond (due to the JavaScript `Date` type). The value is timezone agnostic, i.e. always UTC.
508
508
3. DOS `lastModFileDate` and `lastModFileTime`: supports the years 1980-2108 (inclusive) with 2-second precision. Timezone is interpreted either as the local timezone or UTC depending on the `timezone` option documented below.
509
509
510
-
If both the InfoZIP "universal timestamp" and NTFS extended fields are found, yauzl uses one of them, but which one is unspecified.
510
+
If both the Info-ZIP "universal timestamp" and NTFS extended fields are found, yauzl uses one of them, but which one is unspecified.
511
511
If neither are found, yauzl falls back to the built-in DOS `lastModFileDate` and `lastModFileTime`.
512
512
Every possible bit pattern of every encoding can be represented by a JavaScript `Date` object,
513
513
meaning this function cannot fail (barring parameter validation), and will never return an `Invalid Date` object.
@@ -522,7 +522,7 @@ meaning this function cannot fail (barring parameter validation), and will never
522
522
```
523
523
524
524
Set `forceDosFormat` to `true` (and do not set `timezone`) to enable pre-yauzl 3.2.0 behavior
525
-
where the InfoZIP "universal timestamp" and NTFS extended fields are ignored.
525
+
where the Info-ZIP "universal timestamp" and NTFS extended fields are ignored.
526
526
527
527
The `timezone` option is only used in the DOS fallback.
528
528
If `timezone` is omitted, `null` or `"local"`, the `lastModFileDate` and `lastModFileTime` are interpreted in the system's current timezone (using `new Date(year, ...)`).
@@ -783,7 +783,7 @@ The zip file specification has several ambiguities inherent in its design. Yikes
783
783
## Change History
784
784
785
785
* 3.2.0
786
-
* Added support for reading third-party extensions for timestamps: InfoZIP "universal timestamp" extra field and NTFS extra field. [pull #160](https://github.com/thejoshwolfe/yauzl/pull/160)
786
+
* Added support for reading third-party extensions for timestamps: Info-ZIP "universal timestamp" extra field and NTFS extra field. [pull #160](https://github.com/thejoshwolfe/yauzl/pull/160)
787
787
*`entry.getLastModDate()` takes options `forceDosFormat` to revert the above change, and `timezone` to allow UTC interpretation of DOS timestamps.
788
788
* Documented `dosDateTimeToDate()` as now deprecated.
0 commit comments