search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Create event from UTC

Asked by Anonymous
5 years ago.

I'm trying to add a new calendar event from a UTC string coming from my server.
How do I create an event from my UTC string?
After I add the event it shows the event for 9:00pm when it should show 1:00pm. An example would be preferred.

  • thanks

var dpstart = new DayPilot.Date('2019-02-19T21:00:00').toDate(); // UTC from my server
var dpend = new DayPilot.Date('2019-02-19T21:00:00').toDate(); // UTC from my server
var e = new DayPilot.Event({ start: dpstart, end: dpend, value: DayPilot.guid(), text: "event(should show 1:00 local pacific)", resource: 'E' });
dp.events.add(e).queue();
dp.update();

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.