When the rim of the sun starts appearing defer prayer till it completely appears, and when the rim of the sun disappears defer prayer till it completely disappears. (Using translation from Muslim 829)
"إذا بَدا حاجِبُ الشمسِ فأخِرِوا الصَّلاةَ حتَّى تْبرُزَ، وإذا غابَ حاجِبُ الشَّمْس فأَخِّرِوا الصَّلاةَ حتَّى تَغِيبَ".