LoginSignup
1
1

More than 5 years have passed since last update.

TravisCI のタイムゾーンの変更

Posted at

現象

Jekyll + Github + TravisCI の組み合わせで連携させて,master へのPRが取り込まれたらTravisCIでビルドしてGithub Pages にブログ投稿される仕組みを作ったのですが,当日の記事がbuildされないという現象に陥りました.

原因

どうやら travisci の timezone が日本ではないようで,TravisCI上では前日扱いでビルドしていることになったので当日の記事がビルドされていないようです.

解決方法

timezone を 'Asia/Tokyo' に変更する方法は次のとおりです.
.travis.yml に下記を追記します.

before_script:
  - echo 'Canada/Pacific' | sudo tee /etc/timezone
  - sudo dpkg-reconfigure --frontend noninteractive tzdata

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1