GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Bug]: GE Demo Generator hard-codes Cloud Scheduler timezone to Asia/Tokyo

Open
#3,046 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

### File Name

search/gemini-enterprise/ge-demo-generator/agent_template/adk_agent/app/tools.py

### What happened?

I reproduced a timezone bug in the Gemini Enterprise Demo Generator scheduling flow.

When I asked a generated demo agent to create a recurring daily task for 02:00 PST, the Cloud Scheduler job was created successfully, but the resulting job used:

timeZone: Asia/Tokyo
schedule: 0 2 * * *

This means the cron expression is registered correctly while the requested timezone is ignored.

I then checked the generator template and found that the timezone is hard-coded in two scheduling paths in agent_template/adk_agent/app/tools.py:

time_zone="Asia/Tokyo"

The same hard-coded timezone is also present in the autonomous scheduled task path, and its docstring explicitly describes the cron as using the Asia/Tokyo timezone.

Reproduction:
1. Generate and deploy a Gemini Enterprise demo using ge-demo-generator.
2. Register the generated A2A agent in Gemini Enterprise.
3. Ask the agent to create a recurring task at a timezone-specific time, for example: Run every day at 02:00 PST.
4. Let the agent call the generated scheduling tool.
5. Inspect the created Cloud Scheduler job with gcloud scheduler jobs describe.

Actual behavior:
The job is created with the requested cron expression but with timeZone: Asia/Tokyo.

Expected behavior:
The scheduling tool should accept and persist the requested/user-resolved timezone, or otherwise use an explicit configurable demo timezone. It should not silently force all generated demos to Asia/Tokyo.

For example, a request for 02:00 PST should resolve to an appropriate IANA timezone such as America/Los_Angeles before the Cloud Scheduler job is created.

Why this matters:
Because this code lives in the generator template, patching a single deployed demo does not solve the problem. Every newly generated demo inherits the same hard-coded timezone and can execute scheduled operations at the wrong local time.

I validated this both in a deployed generated demo and in the upstream generator template.

Reported and reproduced by:
Nilden Tutalar
Cloud Solution Architect - Cloud4Next
Contact: nilden.tutalar@cloud4next.com

### Relevant log output

```shell
Requested schedule:
02:00 PST

Created Cloud Scheduler job:
schedule: 0 2 * * *
timeZone: Asia/Tokyo
state: ENABLED

Upstream generator template validation:

File:
search/gemini-enterprise/ge-demo-generator/agent_template/adk_agent/app/tools.py

register_scheduled_task:
time_zone="Asia/Tokyo"

register_scheduled_autonomous_task:
schedule_cron: Cron expression, Asia/Tokyo timezone
time_zone="Asia/Tokyo"
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start in search/gemini-enterprise/ge-demo-generator/agent_template/adk_agent/app/tools.py by reading register_scheduled_task and register_scheduled_autonomous_task, including the autonomous path's timezone docstring. Trace how the requested or resolved timezone reaches Cloud Scheduler; done means neither path silently forces Asia/Tokyo and an explicit IANA timezone is retained for the created job.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.