Skip to content

HistogramItem's Date property has unspecified DateTime Kind #1626

@rokeller

Description

@rokeller

Despite the fact that ElasticSearch's response includes time zone information, the parsed value in the Date property of HistogramItem instances has the Kind property set to 'Unspecified', which is just wrong. I.e. the following Assert would fail:

HistogramItem histogramItem = // ... get from ElasticSearch
Assert.AreNotEqual(DateTimeKind.Unspecified, histogramItem.Date.Kind, "The DateTime Kind must not be Unspecified");

Since the timezone information is present, it should be parsed with that and then accordingly the DateTimeKind should be set on the parsed value.

This is for 1.7.1

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