I think u will need to do these calculation using the longitude and attitude of the city.I once did some kind of that application to tell the prayer times for Muslims all over the world, which depends on the sun status around the day.
my application will be used in the UK only. So, I guess i do not need to care much about the sun's position.do you have the equation to calculate the sunset/sunrise time?thanks