Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Setting Pipeline Environment Timezone

Stew July 16, 2017

Is there a way to change the default timezone of the pipeline environment ? I have a bunch of complex unit tests which are tied into a GMT/BST locale and I don't want to have to put conditional logic in to switch assertions based on environment. Ideally there'd be a pipeline config switch to override the basic UTC timezone?

1 answer

6 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2017

Hi Stewart! 

The pipelines build environment relies on the Docker Image that you're using. Hence, you'd either need to modify the docker image that are using or configure bitbucket-pipelines.yml to run a command to change the timezone

There's an example on how to change the timezone on Pipelines
Bitbucket-pipelines.yml, you can see it at 
https://bitbucket.org/rchiapipeline/pipelinemanualbuild/src/92417616f03ff4954a5e3bdd30d2f899a3bdb446/bitbucket-pipelines.yml?fileviewer=file-view-default

You can also see the output of the Pipelines build at
https://bitbucket.org/rchiapipeline/pipelinemanualbuild/addon/pipelines/home#!/results/%7B106976a6-552b-4907-9ef4-e35504bb3998%7D

Hope this helps :) 

Ana

Stew July 17, 2017

Ana, many thanks for the response and yes it nails the issue. I guess my path to pipelines had circumvented the docker config - but your explanation is entirely logical and has resolved the matter completely. Big thanks, Stew

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2017

That's great to hear, Stew :) Glad I could help!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events