ReactiveX / ReactiveX/RxPY

rx.timer works only with naive date object

Open
#574 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement PR welcome
Dominant language
Python
Stars
5k
Forks
365
Avg merge
3d 14h
Merged PRs (30d)
4

Description

The timer works only with naive datetime object. Because of it, I need to map my datetime object with offset to delta and then use it with the timer.

I think, Schedulers should check if provided object is naive or not and then use datetime.datetime.now(tz=datatime.timezone.utc) or datetime.datetime.utcnow()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing rx.timer into the Schedulers and inspect how they obtain the current time for naive and timezone-aware datetime objects. Reproduce the issue with a datetime carrying an offset, then verify that timer scheduling works for both aware and naive inputs while preserving the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.