Skip to content

Type for each timezone #30

@fenhl

Description

@fenhl

This feature was removed in #1. While I understand the reason for needing a single type that can dynamically represent different time zones, a project I'm currently working on needs to statically mark a value as being in a specific timezone:

#[derive(Deserialize)]
pub struct Event {
    pub start: DateTime<Europe::Berlin>,
    pub end: DateTime<Europe::Berlin>,
    // and some irrelevant fields ...
}

This is because the timestamps I'm deserializing are not marked with any timezone but the documentation specifies that they are to be interpreted as local times in Germany (and that no DST-ambiguous timestamps occur).

It would be great if this library could support both use-cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions