I just learned that the JavaScript Date object apparently always stores the local time zone offset. When posting such a date to the server (using $http.post for example) the server gets the UTC date (local date minus time zone offset). That of course is right. In my case the server stores the date in a database.
When getting dates from the server (using $http.get for example) the server sends back the UTC date. If I directly bind these dates to a view the view displays the wrong date (the UTC date). To avoid that I found out that I must write a new Date instance to the model, passing the date I got from the server.
Problem is that this is a lot of work, especially if the server sends a model that actually should be directly bound to the view.
I am looking for a way to avoid having to create Date instances for each date property of models I got from the server in my controllers.