> ## Content Index
> Fetch the complete content index at: https://www.binarysludge.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Setting a time zone for Sauce Labs tests via Protractor
- URL: https://www.binarysludge.com/2014/08/19/setting-a-time-zone-for-sauce-labs-tests-via-protractor/
- Published: 2014-08-19T18:22:00.000Z
- Updated: 2014-08-19T18:22:00.000Z
- Author: Andrew Martin
- Tags: Protractor, testing, WebDriver, AngularJS, #Import 2026-10-22 12:56

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](http://en.wikipedia.org/wiki/List%5Fof%5Ftz%5Fdatabase%5Ftime%5Fzones?ref=binarysludge.com) \- bear in mind only the latter portion is used (i.e. London, Samoa, Havana)

Using Protractor's [example config file](https://github.com/angular/protractor/blob/e340ff92782740ca39af18118f73835e2d964597/example/conf.js?ref=binarysludge.com) 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'],
};