Sauce Labs servers run UTC. While this is good general practice, for tests with time-sensitive database fixtures or requirements, the developers' time zone may be preferable.
Add a time-zone key to the capabilities object in your Protractor config file. Bear in mind that this is overriden by any multiCapabilities object you may have - if it exists, add them to that object instead.
Possible time-zone values are on Wikipedia - bear in mind only the latter portion is used (i.e. London, Samoa, Havana)
Using Protractor's example config file as a base:
exports.config = {
// get auth tokens from parent environment
// i.e. if BASH: export SAUCE_USERNAME=Andy
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
// Capabilities to be passed to the webdriver instance
// - webdriver config can be extended with Sauce Labs's
// custom conf options from
// https://docs.saucelabs.com/reference/test-configuration/#recording-custom-data
capabilities: {
'browserName': 'chrome',
'time-zone': 'London'
},
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['example_spec.js'],
};
