Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to set the timezone for probot? #1043

Closed
divramod opened this issue Oct 22, 2019 · 4 comments
Closed

Is it possible to set the timezone for probot? #1043

divramod opened this issue Oct 22, 2019 · 4 comments

Comments

@divramod
Copy link

As written in the title probot logging with bunyan assumes to be in timezone utc.
I am in a different timezone, so i like to have the bunyan logs to match my one.
Is that somehow possible?

timedatectl prints out:

                      Local time: Tue 2019-10-22 07:30:50 CEST
                  Universal time: Tue 2019-10-22 05:30:50 UTC
                        RTC time: Tue 2019-10-22 05:30:51
                       Time zone: Europe/Berlin (CEST, +0200)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

I'd like to use my local time, but am getting Universal time in the logs:

05:30:05.551Z  INFO probot: Listening on http://localhost:3000
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question ❓ to this issue, with a confidence of 0.66. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@gr2m
Copy link
Contributor

gr2m commented Oct 22, 2019

Just to make sure, you ask to set the timezone for the logs only, not for Probot's API interactions, right? Because the latter is a thing, too: https://developer.github.com/v3/#timezones

I don't think setting a timezone for logs is something I would recommend doing, it should rather be the job of a log analyzer to display the time in different ways. The UTC timestamp format is universal

GitHub Developer
Get started with one of our guides, or jump straight into the API documentation.

@divramod
Copy link
Author

ah, ok. thx for the input!

@JasonEtco
Copy link
Member

I'll close this out, looks like y'all have figured this one out. I'll go ahead and close this, feel free to reopen if there's something I'm missing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants