The error message is bit misleading, the actual error is
Error: [<interactive>:41:5-41:18] Class Time not found in scope TestingTime.Time.'=='.
The other one is just a weird error that follows from proceeding without knowing what class Time is.
I belive this is correct behaviour, the example uses encapsulated which basically means stop normal lookup rules and look everything up in the global scope. Now when you put Time in a package TestingTime there is no Time in the global scope. You would have to change all import Time to import TestingTime.Time and then the example works.
I pasted in your original code and there Time is a top-level name that's why it worked for me.
I hope that explains it.