Skip to content

DateTime UTC and local mismatch #259

@Siderite

Description

@Siderite

In controllers, in order to display posts, the PubDate of posts is compared with DateTime.UtcNow, only the datetime of the posts is local, even if retrieved from a UTC formatted string. It should be
post.PubDate <= DateTime.Now or post.PubDate.ToUniversalTime() <= DateTime.UtcNow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions