Actually the harmful UV rays that cause skin cancer and sunburn cannot pass through glass. So the glass cockpit windows in airliners (or glass canopies) naturally protects our skin from the sun. Personally I wear a baseball cap to cut down glare, and because the full fighter helmet is a bit heavy. I can do this because like most airlines in this part of the world, the airline that I work for issued it.
Sorry Psychojoe, that's another myth. Pilots have the
highest rate of skin cancers on face and hands of any professional group. This comes from my Dermatologist who is quite senior in his professional group. From personal experience, if I don't wear sunscreen I
will burn on any exposed skin whilst in the aircraft.