gologin-commonjs 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/gologin.js +21 -5
- package/package.json +1 -1
package/dist/src/gologin.js
CHANGED
|
@@ -622,11 +622,27 @@ class GoLogin {
|
|
|
622
622
|
maxAttempts: 5
|
|
623
623
|
});
|
|
624
624
|
} else {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
625
|
+
try {
|
|
626
|
+
data = await _requestretry.default.get(TIMEZONE_URL, {
|
|
627
|
+
timeout: 20 * 1000,
|
|
628
|
+
maxAttempts: 2
|
|
629
|
+
});
|
|
630
|
+
} catch {
|
|
631
|
+
data = {
|
|
632
|
+
body: JSON.stringify({
|
|
633
|
+
country: "ID",
|
|
634
|
+
stateProv: "Jakarta",
|
|
635
|
+
city: "Jakarta",
|
|
636
|
+
timezone: "Asia/Jakarta",
|
|
637
|
+
ll: [
|
|
638
|
+
"-6.21140",
|
|
639
|
+
"106.84460"
|
|
640
|
+
],
|
|
641
|
+
languages: "id",
|
|
642
|
+
accuracy: 100
|
|
643
|
+
})
|
|
644
|
+
}
|
|
645
|
+
}
|
|
630
646
|
}
|
|
631
647
|
debug('getTimeZone finish', data.body);
|
|
632
648
|
this._tz = JSON.parse(data.body);
|