Answer by Davislor for Checking to see if the current time is close to 9PM
This is already in the Standard Library. Use std::chrono::utc_clock from <chrono>, and compute the duration:const auto now = std::chrono::utc_clock::now();const auto time_of_day = now -...
View ArticleChecking to see if the current time is close to 9PM
I want to check if the current time is "close" to 9pm UTC. I have the following code to a.) get "now" and convert it to UTC time and b.) get 9pm utc time.Based off when I run it, it looks like it's...
View Article