在流星服务器问题

时间:2016-06-03 09:58:38

标签: javascript meteor galaxy

我的应用程序在我的本地笔记本电脑上完美运行:

我只想为日历应用程序保存一个新事件,所以我在服务器端使用Meteor方法执行此操作:

var startAt = moment(startString, "DD/MM/YYYY HH:mm").toDate();
var endAt = moment(endString, "DD/MM/YYYY HH:mm").toDate();

然后我创建要保存在db中的对象:

var event = _.extend(_.pick(eventAttributes,
  "calendarId",
  "patientId",
  "tagId",
  "recurrent",
  "emailConfirmation"
), {
  status: "pending",
  startAt: startAt,
  endAt: endAt,
  cloneEvent: false,
  recurrencies: recurrencies,
  createdBy: user._id,
  submitted: new Date().getTime()
});

我使用Meteor Galaxy和Compose(位于美国,我在法国工作),我的问题是当我在服务器上保存事件时,我从我创建的开始日期开始移动2小时:例如:我的时间是8:15,它在10:15保存:

{startAt: ISODate("2016-06-01T10:15:00Z"), endAt: ISODate("2016-06-01T11:00:00Z" }

有什么想法吗?

0 个答案:

没有答案
相关问题