From cd33053885f477db6004347f112755a5039d8fd4 Mon Sep 17 00:00:00 2001 From: Vincent Cloutier Date: Fri, 25 Nov 2022 15:29:47 -0500 Subject: [PATCH] DateTime fix --- src/BirdsiteLive.Twitter/TwitterTweetsService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/BirdsiteLive.Twitter/TwitterTweetsService.cs b/src/BirdsiteLive.Twitter/TwitterTweetsService.cs index 7c0d214..8b69ced 100644 --- a/src/BirdsiteLive.Twitter/TwitterTweetsService.cs +++ b/src/BirdsiteLive.Twitter/TwitterTweetsService.cs @@ -138,6 +138,9 @@ namespace BirdsiteLive.Twitter try { + string creationTime = tweet.GetProperty("content").GetProperty("itemContent") + .GetProperty("tweet_results").GetProperty("result").GetProperty("legacy") + .GetProperty("created_at").GetString(); var extractedTweet = new ExtractedTweet { Id = Int64.Parse(tweet.GetProperty("sortIndex").GetString()), @@ -146,9 +149,7 @@ namespace BirdsiteLive.Twitter MessageContent = tweet.GetProperty("content").GetProperty("itemContent") .GetProperty("tweet_results").GetProperty("result").GetProperty("legacy") .GetProperty("full_text").GetString(), - CreatedAt = DateTime.Now, //tweet.GetProperty("content").GetProperty("itemContent") -// .GetProperty("tweet_results").GetProperty("result").GetProperty("legacy") -// .GetProperty("created_at").GetDateTime(), + CreatedAt = DateTime.Parse(creationTime), IsReply = false, IsThread = false, IsRetweet = false,