"Do you have the time" can be a polite way to ask someone what time it is. It is also a way to ask if someone has enought time available to do something.
I notice my watch has stopped, so I say to someone passing by, "Excuse me, do you have the time?"
You have volunteered to help me with something, but I don't want to inconvenience you. "Thanks, that would be very helpful, but I know how busy you are. Do you have the time?"
"Do you have a time" is not correct in any situation I can think of.
[business writer, not a teacher]