Update DateTime String method to use Value()

Refactor the DateTime String method to use the Value() function instead of accessing the internal field directly, for better encapsulation and readability.
This commit is contained in:
Winni Neessen 2023-06-27 16:12:59 +02:00
parent d7567d4b2b
commit a10ec1c0f9
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -36,5 +36,5 @@ func (dt DateTime) Value() time.Time {
// String satisfies the fmt.Stringer interface for the DateTime type
// The date will returned as time.RFC3339 format
func (dt DateTime) String() string {
return dt.dv.Format(time.RFC3339)
return dt.Value().Format(time.RFC3339)
}