Skip to content

Commit

Permalink
Specify DateTime kind (Azure#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
ancaantochi authored and avranju committed Aug 13, 2018
1 parent a090acb commit 38b0727
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions edge-modules/MessagesAnalyzer/PartitionReceiverHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ public Task ProcessEventsAsync(IEnumerable<EventData> events)

if (sequence != null && batchId != null)
{
DateTime enqueuedtime = DateTime.MinValue;
DateTime enqueuedtime = DateTime.MinValue.ToUniversalTime();
if (eventData.SystemProperties.TryGetValue(EnqueuedTimePropertyName, out object enqueued))
{
DateTime.TryParse(enqueued.ToString(), out enqueuedtime);
if (DateTime.TryParse(enqueued.ToString(), out enqueuedtime))
{
enqueuedtime = DateTime.SpecifyKind(enqueuedtime, DateTimeKind.Utc);
}
}

if (long.TryParse(sequence.ToString(), out long sequenceNumber))
Expand Down

0 comments on commit 38b0727

Please sign in to comment.