summaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/luxon/src/zones
diff options
context:
space:
mode:
Diffstat (limited to 'npm_assets/node_modules/luxon/src/zones')
-rw-r--r--npm_assets/node_modules/luxon/src/zones/IANAZone.js9
-rw-r--r--npm_assets/node_modules/luxon/src/zones/localZone.js2
2 files changed, 7 insertions, 4 deletions
diff --git a/npm_assets/node_modules/luxon/src/zones/IANAZone.js b/npm_assets/node_modules/luxon/src/zones/IANAZone.js
index e2ad296..777958d 100644
--- a/npm_assets/node_modules/luxon/src/zones/IANAZone.js
+++ b/npm_assets/node_modules/luxon/src/zones/IANAZone.js
@@ -109,7 +109,7 @@ export default class IANAZone extends Zone {
/** @ignore */
static parseGMTOffset(specifier) {
if (specifier) {
- const match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i);
+ const match = specifier.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);
if (match) {
return -60 * parseInt(match[1]);
}
@@ -152,8 +152,11 @@ export default class IANAZone extends Zone {
/** @override **/
offset(ts) {
- const date = new Date(ts),
- dtf = makeDTF(this.name),
+ const date = new Date(ts);
+
+ if (isNaN(date)) return NaN;
+
+ const dtf = makeDTF(this.name),
[year, month, day, hour, minute, second] = dtf.formatToParts
? partsOffset(dtf, date)
: hackyOffset(dtf, date),
diff --git a/npm_assets/node_modules/luxon/src/zones/localZone.js b/npm_assets/node_modules/luxon/src/zones/localZone.js
index b8cbcdc..dae9b2a 100644
--- a/npm_assets/node_modules/luxon/src/zones/localZone.js
+++ b/npm_assets/node_modules/luxon/src/zones/localZone.js
@@ -4,7 +4,7 @@ import Zone from "../zone.js";
let singleton = null;
/**
- * Represents the local zone for this Javascript environment.
+ * Represents the local zone for this JavaScript environment.
* @implements {Zone}
*/
export default class LocalZone extends Zone {