As well as knowing when sunset is, you need to know what National rules are regarding when night flying starts. In the UK it is 30 mins after Official Sunset. However, there are 4 different sorts of sunset - official, civil, nautical and astronomical. Some countries may well use civil sunset as the night flying time (it's used in the UK as 'lighting-up time').