Skip to content

Commit 2105905

Browse files
committed
Refactor CreatedAt property and add CreatedAtUtc
Changed CreatedAt from DateTime to string with default empty value. Added CreatedAtUtc as DateTime with [JsonIgnore] attribute to parse CreatedAt string to UTC DateTime.
1 parent a37c0e6 commit 2105905

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/Blink/Models/BlinkVideoInfo.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public class BlinkVideoInfo
3030
/// Video timestamp
3131
/// </summary>
3232
[JsonPropertyName("created_at")]
33-
public DateTime CreatedAt { get; set; }
33+
public string CreatedAt { get; set; } = string.Empty;
34+
35+
/// <summary>
36+
/// Video timestamp in UTC DateTime
37+
/// </summary>
38+
[JsonIgnore]
39+
public DateTime CreatedAtUtc => DateTime.Parse(CreatedAt + "Z");
3440

3541
/// <summary>
3642
/// Network ID

0 commit comments

Comments
 (0)