For me it varies greatly as such things as emotional/physical wellbeing, distractions at home, etc. will have a huge impact on productivity.
During my best weeks I wrote as much as 2-4 hours per workday, plus up to 4-8 hours on a weekend.
During my worst weeks I wrote as much as five sentences or nothing at all.
Those advices you heard are more applicable for writers who plan to pursue a career in writing, i.e. make it their primary/only source of income. Honing a habit of writing for long hours in necessary in such case.
If your goal is to write for your own pleasure, be a hobby writer, write a few books to get them out of your system and similar scenarios - that's a completely different situation, and therefore, less pressure to put in the hours every single day.