whtrapp / whtrapp.github.io

A minimalistic weather webapp
https://whtrapp.github.io/
1 stars 15 forks source link

Enhancement: Time updates in real-time #2

Open AkshatGupta2005 opened 4 days ago

AkshatGupta2005 commented 4 days ago

This commit will change time automatically.

Note - The time changed when the api changes its local time, I used setInterval for a function, It will change time after 1 min only if the time in api response changes.

HemanthTenneti commented 4 days ago

Hey @AkshatGupta2005, time does not update automatically. I think it must be a problem with the intervals you're calling the function in. I've tried checking it with 2-3 minute intervals of waiting and the time does not update.

Please look into it. Regards.

AkshatGupta2005 commented 4 days ago

Yes, I did some research. We can use world time API to get local time, which can give time precious of every second, Give me some time, Let me try it.

VBsaini commented 2 days ago

can i give this a try?

AkshatGupta2005 commented 2 days ago

Actually my code is almost complete.