openforis / sepal

Geographical Data Processing in the Cloud
https://sepal.io/
MIT License
207 stars 46 forks source link

change the sandbox time according to browser local time #131

Open 12rambau opened 2 years ago

12rambau commented 2 years ago

I assume that the Linux sanboxes are using the univerdsal time. When using notebooks, whe cannot access browser informations and if we try to display time, it never correspond to the current time in in the current timezone.

Where is it useful ?

when runing processes in the sandbox apps, we use a specific message box with a timestamp that help the user to "see" the advancement of the process (and make sure that the kernel didn't died). In the current set-up this information is rarely useful because the timestamp is not adapted to the timezone.

from sepal_ui import sepalwidgets as sw 
import time 
from IPython.display import display

toto = sw.Alert()
display(toto)

for i in range(10):
    time.sleep(2)
    toto.update_progress((i+1)/10)
Capture d’écran 2021-09-30 à 10 00 20

what could be done ?

Would it be possible, when opening the sandbox, to gather information from the browser and/or the local computer and adapt the sandbox timezone ?