Skip to content

scheduler has date format error when deployed to cloud run functions v2 #261

@escottgoodwin

Description

@escottgoodwin

using decorator

@scheduler_fn.on_schedule(schedule="0 * * * *",
timezone="America/Los_Angeles",
memory=options.MemoryOption.GB_1,
timeout_sec=540)

gives ths error with firebase-functions==0.4.2

"Exception on / [POST]
Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/flask/app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/flask/app.py", line 919, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/functions_framework/execution_id.py", line 106, in wrapper
return view_function(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/functions_framework/init.py", line 142, in view_func
return function(request._get_current_object())
File "/layers/google.python.pip/pip/lib/python3.13/site-packages/firebase_functions/scheduler_fn.py", line 103, in on_schedule_wrapped
schedule_time = _dt.datetime.strptime(
schedule_time_str,
"%Y-%m-%dT%H:%M:%S%z",
)
File "/layers/google.python.runtime/python/lib/python3.13/_strptime.py", line 789, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.runtime/python/lib/python3.13/_strptime.py", line 555, in _strptime
raise ValueError("time data %r does not match format %r" %
(data_string, format))
ValueError: time data '2025-11-08T20:00:01.670593-08:00' does not match format '%Y-%m-%dT%H:%M:%S%z'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions