Skip to content

feat: Changed to aware timezone on scheduled_function, swapped if/else to remove empty body. - #3

Open
GabrielZilioti wants to merge 1 commit into
whdev1:mainfrom
GabrielZilioti:optimized_main
Open

feat: Changed to aware timezone on scheduled_function, swapped if/else to remove empty body.#3
GabrielZilioti wants to merge 1 commit into
whdev1:mainfrom
GabrielZilioti:optimized_main

Conversation

@GabrielZilioti

Copy link
Copy Markdown

Hello, I've made a few minor improvements on the code, like using aware timezone.

@GabrielZilioti
GabrielZilioti marked this pull request as draft November 21, 2022 13:53
@GabrielZilioti

Copy link
Copy Markdown
Author

@whdev1

@GabrielZilioti
GabrielZilioti marked this pull request as ready for review November 21, 2022 13:55
Comment thread pycron/__init__.py

# check if the function should run based on whether or not the current timestamp
# meets or exceeds the next run timestamp
current_timestamp: float = datetime.now().timestamp()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not here be current_timestamp also be UTC ?

on line 88(82) ur are comparing current_timestamp (which is not UTC) with scheduled_function.last_run (with is UTC) + cron delta. looks like bug, no?)

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

Successfully merging this pull request may close these issues.

2 participants