Set calendar time zone to angular-bootstrap-calendar?

I use angular-bootstrap-calendar to display a short-term rental calendar. Currently, the calendar displays dates in the time zone of the browser, but the user is not always in the same time zone as the list that they manage.

How to set the calendar time zone so that it shows the dates in the listing time zone, and not the browser time zone?

+6
source share
1 answer

Just include moment-timezone, for example, in bower.json:

"moment-timezone": "^0.5.14",

(latest version), set the desired time zone to app.js' .run(), I have

.run(function(...) {
  ...
  moment.tz.setDefault("Europe/Copenhagen"); 
}

You seem to live in San Diego:

moment.tz.setDefault("America/Los_Angeles"); 
0

All Articles