Skip to content

Commit d98e052

Browse files
committed
fix name of Info-ZIP
1 parent a8951a2 commit d98e052

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,11 @@ Due to the zip file specification having lackluster support for specifying times
503503
there are several third-party extensions that add better support.
504504
yauzl supports these encodings:
505505

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.
507507
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.
508508
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.
509509

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.
511511
If neither are found, yauzl falls back to the built-in DOS `lastModFileDate` and `lastModFileTime`.
512512
Every possible bit pattern of every encoding can be represented by a JavaScript `Date` object,
513513
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
522522
```
523523

524524
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.
526526

527527
The `timezone` option is only used in the DOS fallback.
528528
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
783783
## Change History
784784

785785
* 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)
787787
* `entry.getLastModDate()` takes options `forceDosFormat` to revert the above change, and `timezone` to allow UTC interpretation of DOS timestamps.
788788
* Documented `dosDateTimeToDate()` as now deprecated.
789789
* 3.1.3

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ Entry.prototype.getLastModDate = function(options) {
597597
for (var i = 0; i < this.extraFields.length; i++) {
598598
var extraField = this.extraFields[i];
599599
if (extraField.id === 0x5455) {
600-
// InfoZIP "universal timestamp" extended field (`0x5455` aka `"UT"`).
601-
// See the InfoZIP source code unix/unix.c:set_extra_field() and zipfile.c:ef_scan_ut_time().
600+
// Info-ZIP "universal timestamp" extended field (`0x5455` aka `"UT"`).
601+
// See the Info-ZIP source code unix/unix.c:set_extra_field() and zipfile.c:ef_scan_ut_time().
602602
var data = extraField.data;
603603
if (data.length < 5) continue; // Too short.
604604
// The flags define which of the three fields are present: mtime, atime, ctime.

0 commit comments

Comments
 (0)