Time expression: "Quarter of"

The OED on “of” (excerpt).

The OED says “off” is derived from “of” (excerpt).

This is consistent with something I read once, that “of” was originally pronounced just like “off”, unlike our pronouncing it as “uv”.

So as already stated, “quarter of 5” is an archaic usage that means one quarter of an hour away from 5.