Translation:It is 8:08.
You'll be able to tell once you read an entire phrase to see what the context is. It's no different thean the English symbol number 0 and the letter O. When we read the whole word/ sentence we know whether the letter O is being used or whether the number 0 is being used. Same thing with your examples you used. One is a number while the other is a sound expressed with Katakana.
english is not my first language but i believe you can only say o clock when it's an exact hour, with zero minutes
The reason why the second 八 is shortened to hap- is because the reading "hachi" was borrowed from Middle Chinese /piet/ (something like that) where the last -t sound was an entering tone (入声) and sounded like a glottal stop. Because Japanese is a language full of syllables it was difficult for them to make that glottal stop UNLESS another consonant followed after, like 分. And this is also the case with 一，六，七，十 which were all entering tone 入声 where their "normal" forms are two syllables but are shortened to one syllable when connected to a consonant after.