korbit-ai[bot] commented on code in PR #33693:
URL: https://github.com/apache/superset/pull/33693#discussion_r2127440696
##########
superset/daos/dataset.py:
##########
@@ -198,7 +198,7 @@ def update(
force_update = True
if force_update:
- attributes["changed_on"] = datetime.now(tz=timezone.utc)
+ attributes["changed_on"] = datetime.now()
Review Comment:
### Naive Datetime Usage <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The code creates naive datetime objects (without timezone information) for
changed_on timestamp
###### Why this matters
Using naive datetimes can lead to timezone-related bugs and inconsistencies
when handling timestamps across different systems or timezones
###### Suggested change ∙ *Feature Preview*
Use timezone-aware datetime by either restoring `timezone.utc` import and
using `datetime.now(tz=timezone.utc)` or using a consistent timezone strategy
throughout the application
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f8ce299d-5f2a-49a6-a10a-da5ec72f9395/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f8ce299d-5f2a-49a6-a10a-da5ec72f9395?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f8ce299d-5f2a-49a6-a10a-da5ec72f9395?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f8ce299d-5f2a-49a6-a10a-da5ec72f9395?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/f8ce299d-5f2a-49a6-a10a-da5ec72f9395)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:acfd240e-c386-4971-9e99-1eb1313bef93 -->
[](acfd240e-c386-4971-9e99-1eb1313bef93)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]