Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Dec 16, 2022

Closes #441

Proposed Changes

This PR allows to use new DateTime(2015, 10, 15, 8, 20, 15, DateTimeKind.Local); or new DateTime(2015, 10, 15, 8, 20, 15, DateTimeKind.Unspecified) as a timestamp for PointData:

var dateTime = new DateTime(2015, 10, 15, 8, 20, 15, DateTimeKind.Unspecified);

var point = PointData.Measurement("h2o")
    .Tag("location", "europe")
    .Field("level", 2)
    .Timestamp(new DateTime(2015, 10, 15, 8, 20, 15, DateTimeKind.Unspecified), WritePrecision.Ms);

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • dotnet test completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@bednar bednar marked this pull request as ready for review December 16, 2022 09:20
@bednar bednar requested a review from powersj December 16, 2022 09:20
@bednar bednar merged commit fdc9ddc into master Dec 16, 2022
@bednar bednar deleted the datetime-local branch December 16, 2022 14:46
@bednar bednar added this to the 4.10.0 milestone Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow "DateTimeKind.Local" as TimeStamp
2 participants