Indian Standard Time is UTC + 05: 30, which is probably why you see a difference of 30 minutes.
The algorithm can calculate sunrise times in UTC, but it will not be able to convert UTC to local time, which requires complicated knowledge of the time zone. The algorithm probably does something very simplified, like
localTime = utcTime + 1_hour * longitude / 15_degree
which is 5 hours for the city of Banglor.
You must use UTC time and then convert it to local time using the date date API.
source share