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

Actions workflow schedule to support UTC #31657

Closed
keyallis opened this issue Jul 18, 2024 · 1 comment · Fixed by #31742
Closed

Actions workflow schedule to support UTC #31657

keyallis opened this issue Jul 18, 2024 · 1 comment · Fixed by #31742
Labels
topic/gitea-actions related to the actions of Gitea type/bug type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@keyallis
Copy link

Feature Description

It is my understanding that Github Actions schedule objects are all interpreted as UTC. After configuring some cron workflows and setting them to run at 9AM, I have noticed that they run at 9AM local time and not 9AM UTC. I am unsure if this was an intended effect or could be viewed as a bug.

I see the following as paths forward:

  • Document that workflow schedules are configured to local time
  • Change workflow schedules to instead be based on UTC
  • Add a configuration value to allow cron to be interpreted as either local or UTC, default to use local to retain current behaviors and add documentation to clarify

For posterity here is my observed behavior:
Given a workflow defined to run as

on:
  schedule:
    - cron: "0 9 * * *"

I see job ran ~25 minutes ago at roughly that amount of time past 9AM local
image

Screenshots

image

@keyallis keyallis added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 18, 2024
@wolfogre
Copy link
Member

Confirmed, it's a bug. Before it gets fixed, you can specify the timezone like TZ=UTC 0 9 * * *.

@wolfogre wolfogre added type/bug topic/gitea-actions related to the actions of Gitea labels Jul 31, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants