Added timezone management in the Javascript part

The timezone can be different between the host and the client.

With #77, the datetime to timestamp function now returns an UTC time instead of a local time.
The javascript functions handle an UTC time too to calculate time intervals.