Skip to content

Commit 2ac03fd

Browse files
add timezone support
1 parent f856e40 commit 2ac03fd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

commands/utils/default_config_10.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
npm_dependencies: {
2727
cypress: "10.5.0",
2828
},
29+
timezone:"",
2930
},
3031
tunnel_settings: {
3132
tunnel: false,

commands/utils/set_args.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,13 @@ function sync_args_from_cmd(args) {
448448
lt_config["run_settings"]["geo_location"] = "";
449449
}
450450

451+
//Check for timezone
452+
if ("timezone" in args) {
453+
lt_config["run_settings"]["timezone"] = args["timezone"];
454+
} else if (!lt_config["run_settings"]["timezone"]) {
455+
lt_config["run_settings"]["timezone"] = "";
456+
}
457+
451458
//Check for stop on failure location
452459
if ("stop_on_failure" in args) {
453460
lt_config["run_settings"]["stop_on_failure"] = true;

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ const argv = require("yargs")
250250
alias: "accessibility",
251251
describe: "enable accessibility testing for cypress.",
252252
type: "bool",
253+
})
254+
.option("timezone",{
255+
alias: "tz",
256+
describe: "Set custom timezone in machine for cypress.",
257+
type: "string",
253258
});
254259
},
255260
function (argv) {

0 commit comments

Comments
 (0)