From b4af62626bdcec36912873d396b766ba7cacfe93 Mon Sep 17 00:00:00 2001 From: Raphael Kabo Date: Fri, 2 Aug 2019 09:42:01 +0100 Subject: Added timezone field in database --- models/Event.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'models/Event.js') diff --git a/models/Event.js b/models/Event.js index 82c7904..90c8117 100755 --- a/models/Event.js +++ b/models/Event.js @@ -85,18 +85,19 @@ const EventSchema = new mongoose.Schema({ trim: true, required: true }, - start: { + start: { // Stored as a UTC timestamp type: Date, trim: true, required: true }, - end: { + end: { // Stored as a UTC timestamp type: Date, trim: true, required: true }, timezone: { - type: String + type: String, + default: 'Etc/UTC' }, description: { type: String, -- cgit v1.2.3