I'm writing a server in C that is meant to get a request over UDP for the time in either: Doha, Prague, New York or Berlin. How can I produce the right response?
I tried looking into the localtime() method but couldn't find anything relating to a timezone
Ok so I figured it out on my own. Let's say I want the current time in Doha. Apparently Doha's time is UTC+3. Which means that I need to get the current UTC time and add 3 hours to it like so: