Do you mean latitude? I remember the days being longer in the summer when I lived at higher latitudes, but I'm having trouble seeing how you could calculate longitude by looking at sunrise/sunset.
Sunrise and sunset together will give you local noon (or local midnight). Local noon plus an accurate timepiece set to a known location will give you a time offset. Knowing your time offset is equivalent to knowing your longitude (which was the whole purpose behind the Harrison chronographs). You won't know it to a tremendous accuracy, since you can't get the exact moment of sunrise or sunset, just a vague idea, your position is likely to change between sunrise and sunset, and dead reckoning on a featureless sea under a featureless sky can only be so accurate. But it's knowing the difference between local time and a reference time that gets you longitude.
No, it would be the longitude. The average of sunrise and sunset will be local noon, and from that you get the longitude. To get the latitude you would need to see where the Sun rises and sets or see the stars, neither of which you could do very accurately under heavy cloud cover.
Thanks stan_rogers and splat, using local noon plus a clock makes total sense after you described how it works. And I just read a fun Wikipedia node on the history of longitude for good measure too.