In my opinion, "for the longest time" means "for a very long time", but with an attitude of surprise. It almost means "for a surprisingly long time". " is almost a formula.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.