@gheharukoh7 I don't know in Pythonista but ios standard app Shortcuts allows you to define a set of actions which is automatically executed when your device connects to a (new) wifi network.
You could get the date/time and store it in a file..., or compute the delta from previous time.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.