A simpler version of the server code part, starting from the time_zone
gotten from the JS code and a Python datetime object dt
:
import pytz
tz_user = pytz.timezone(time_zone)
dt_user = dt.astimezone(tz_user)
A simpler version of the server code part, starting from the time_zone
gotten from the JS code and a Python datetime object dt
:
import pytz
tz_user = pytz.timezone(time_zone)
dt_user = dt.astimezone(tz_user)