Do you set the default timezone for moment as well? Since "2016-03-12 04:00:00" does not include timezone information, it will be parsed in the local timezone which unless it is explicitly set, will be the timezone for the local machine. Or you could do moment.tz("2016-03-12 04:00:00", "Europe/Berlin")
instead.
Btw, you could use moment('...').valueOf()
- there is no need to create a Date
first.
Although, reading again - I suppose the issue is that the chart is set to display unit 6 h
instead of 1 h
. Although it should have rounded up the limit instead of down, if you want to show the data by 1 hour, you should play with the settings timeAxis.minUnitWidth
and timeAxis.unitSizePolicy
(or use navigation.initialDisplayUnit
to force the initial view to what you need.