One can go through immigration within 10 hours of flight departure (so I've been told on various occasions), however 11-12 hours beforehand (I couldn't nail down the exact timing) I've been allowed through (by machine). Lounges access(via dragon (or gate in BJ lounge)) in my experience has always been 24 hours beforefand.