mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix timezone error
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "137.0.2",
|
||||
"version": "137.0.3",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"private": true,
|
||||
|
||||
+4
-4
@@ -15,9 +15,9 @@ module.exports = class TimezoneType extends ArgumentType {
|
||||
new ZipToTz().full(value);
|
||||
return true;
|
||||
} catch {
|
||||
const cityZone = cityTimezones.lookupViaCity(value);
|
||||
const cityZone = cityTimezones.lookupViaCity(value).filter(res => res.timezone);
|
||||
if (cityZone.length) return true;
|
||||
const provZone = cityTimezones.findFromCityStateProvince(value);
|
||||
const provZone = cityTimezones.findFromCityStateProvince(value).filter(res => res.timezone);
|
||||
if (provZone.length) return true;
|
||||
}
|
||||
return false;
|
||||
@@ -30,9 +30,9 @@ module.exports = class TimezoneType extends ArgumentType {
|
||||
const zipZone = new ZipToTz().full(value);
|
||||
return zipZone;
|
||||
} catch {
|
||||
const cityZone = cityTimezones.lookupViaCity(value);
|
||||
const cityZone = cityTimezones.lookupViaCity(value).filter(res => res.timezone);
|
||||
if (cityZone.length) return cityZone[0].timezone;
|
||||
const provZone = cityTimezones.findFromCityStateProvince(value);
|
||||
const provZone = cityTimezones.findFromCityStateProvince(value).filter(res => res.timezone);
|
||||
if (provZone.length) return provZone[0].timezone;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user