From 1d8dc2a07285bd27c2dee6f32e604b834bf090b6 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 12 Feb 2016 13:29:53 -0800 Subject: [PATCH] Fix time parsing from API default value Signed-off-by: Michael Crosby --- api/grpc/server/server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/grpc/server/server.go b/api/grpc/server/server.go index f2e2afc..9e1f45c 100644 --- a/api/grpc/server/server.go +++ b/api/grpc/server/server.go @@ -271,7 +271,11 @@ func (s *apiServer) UpdateProcess(ctx context.Context, r *types.UpdateProcessReq } func (s *apiServer) Events(r *types.EventsRequest, stream types.API_EventsServer) error { - events := s.sv.Events(time.Unix(int64(r.Timestamp), 0)) + t := time.Time{} + if r.Timestamp != 0 { + t = time.Unix(int64(r.Timestamp), 0) + } + events := s.sv.Events(t) defer s.sv.Unsubscribe(events) for e := range events { if err := stream.Send(&types.Event{