@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.