I
I
impressive172020-10-18 16:30:01
go
impressive17, 2020-10-18 16:30:01

How to compare time in golang?

I need to understand if it's later than 10:00 UTC or not in golang. How can I do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2020-10-18
@ghostiam

https://golang.org/pkg/time/#Time.After
https://golang.org/pkg/time/#Time.Before
Or
time.Now().UTC().Hour() >= 10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question