8000 Replace direct datetime.now() usages with a date-time service · Issue #199 · rexor12/holobot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Replace direct datetime.now() usages with a date-time service #199
Open
@rexor12

Description

@rexor12

To reduce the probability of miusing datetime.utcnow() versus datetime.now(timezone.utc) as well as improve testability, a service should be implemented that can be used to query the current date and time.

class IDateTimeProvider(Protocol):
    def utcnow(self) -> datetime: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: frameworkChanges that need to be implemented in the framework component.technicalTechnical changes that don't belong to a business feature.

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0