a time sync program that I press two buttons and it sets my clock with world time
There is no need for that in this era. These programs were fairly commonplace in the 1980s and early 1990s. I even released one way back in 2001 or so. But that need has passed.
Windows XP introduced an automatic time synchronization, and it remains in place. In the Unix world there has been NTPD, Network Time Protocol Daemon, since about 1990, and other programs before that so network servers could stay in sync. Mobile devices have this built-in, cell phones update based on the cellular network.
You might build your program as a learning tool, but realize the functionality is already built in for most systems.
does a little program like this make my internet insecure for firewall/anti virus?
Possibly, yes. But the degree of insecurity depends on the details.
You are making outbound connections and using the data, so there are some attack vectors. The attacks are moderately more difficult since outbound connections would require faking the server and giving a carefully crafted response that your program is vulnerable to. You can reduce this by validating that the data you receive is exactly the right size, contains exactly what you expect, and is within the bounds you consider reasonable.
If you allow inbound connections there are additional attacks possible. Anyone scanning the computer's open ports could find the port, and they could probe it with all kinds of data attempting to find a weakness. There are various weaknesses, including the possibility of extracting data from the network handshaking itself, like the Heartbleed vulnerability.
There are protections around modifying the system time, so you will need elevated privileges. If you are doing it as a learning experience, figuring out how to properly request elevated privileges could be enlightening. However, be aware that with elevated privileges comes elevated responsibility, that is a vulnerability by itself. Any bugs in your program could do damage to the system, and people may not trust it.
I am considering what people think about here as well.
If you are doing it as a learning exercise, that's great and I'm sure you can learn a lot.
If you are doing it to make a utility for the world to consume, don't bother. There are already great programs for that, generally built into the operating system directly.