From 7d8e5f8b92344a313a587317677f9c63b64cfcfd Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 24 Mar 2020 00:26:22 -0500 Subject: [PATCH] deserialize as time --- lights.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lights.go b/lights.go index e6a3857..a569f62 100644 --- a/lights.go +++ b/lights.go @@ -4,6 +4,7 @@ import ( //"crypto/tls" "encoding/json" "net/http" + "time" ) const ( @@ -49,7 +50,7 @@ type ( Group Selector `json:"group"` Location Selector `json:"location"` Product Product `json:"product"` - LastSeen string `json:"last_seen"` + LastSeen time.Time `json:"last_seen"` SecondsLastSeen float64 `json:"seconds_last_seen"` }