fefe
fefe

Reputation: 9055

CalHeatmap adjust timestamp timezone when data is loaded

I'm using CalHeatmap where I populate the calendar with server side data async and I face a problem with the logged in user timestamp because it seems like the timestamp timezone is converted to browsers location. Is there a way to convert the data to a specific timezone? In my case Europe/Berlin ?

and I try to modify with momentjs the timezone

afterLoadData: function (timestamps) {

    let results = {}
     for (var timestamp in timestamps) {
     var newTimestamp = momentTz.tz(timestamp, 'Europe/Berlin')
     results[newTimestamp] = timestamps[timestamp];
  };

  return results

}

but this will not work

Upvotes: 0

Views: 56

Answers (0)

Related Questions