A 12-hour laptop battery life is a little bit of a red herring: yes, you can get it on efficient ultrabooks and MacBooks, with light use like web browsing or office work, on low brightness and minimal background apps. This is true on MacOS, Windows and Linux. The first two may be better at handling low power modes on hardware peripherals, but OTOH on Linux I have a better control over background tasks.
I have an absolute trash travel laptop from last decade, running Fedora Linux, and it lasts for multiple days if I keep it mostly closed and just open it for whatever browsing/editing I need on the road.