diff --git a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs
index 347b0daaa..3beffdbb6 100644
--- a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs
+++ b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs
@@ -15,7 +15,7 @@ namespace Discord
///
/// Gets or sets the time for this timestamp tag.
///
- public DateTime Time { get; set; }
+ public DateTimeOffset Time { get; set; }
///
/// Converts the current timestamp tag to the string representation supported by discord.
@@ -26,11 +26,11 @@ namespace Discord
/// A string that is compatible in a discord message, ex: <t:1625944201:f>
public override string ToString()
{
- return $"";
+ return $"";
}
///
- /// Creates a new timestamp tag with the specified datetime object.
+ /// Creates a new timestamp tag with the specified object.
///
/// The time of this timestamp tag.
/// The style for this timestamp tag.
@@ -43,5 +43,20 @@ namespace Discord
Time = time
};
}
+
+ ///
+ /// Creates a new timestamp tag with the specified object.
+ ///
+ /// The time of this timestamp tag.
+ /// The style for this timestamp tag.
+ /// The newly create timestamp tag.
+ public static TimestampTag FromDateTimeOffset(DateTimeOffset time, TimestampTagStyles style = TimestampTagStyles.ShortDateTime)
+ {
+ return new TimestampTag
+ {
+ Style = style,
+ Time = time
+ };
+ }
}
-}
+}
\ No newline at end of file