FIX: output UTC

FIX: output UTC

diff --git a/app/controllers/discourse_post_event/events_controller.rb b/app/controllers/discourse_post_event/events_controller.rb
index b13557a..efa676f 100644
--- a/app/controllers/discourse_post_event/events_controller.rb
+++ b/app/controllers/discourse_post_event/events_controller.rb
@@ -65,7 +65,6 @@ module DiscoursePostEvent
       event = Event.new(event_params)
       guardian.ensure_can_edit!(event.post)
       guardian.ensure_can_create_discourse_post_event!
-      event.enforce_utc!(event_params)
 
       case event_params[:status].to_i
       when Event.statuses[:private]
diff --git a/app/models/discourse_post_event/event.rb b/app/models/discourse_post_event/event.rb
index 629880a..f82ca7e 100644
--- a/app/models/discourse_post_event/event.rb
+++ b/app/models/discourse_post_event/event.rb
@@ -158,15 +158,6 @@ module DiscoursePostEvent
       self.notify_invitees!
     end
 
-    def enforce_utc!(params)
-      if params[:starts_at].present?
-        params[:starts_at] = Time.parse(params[:starts_at]).utc
-      end
-      if params[:ends_at].present?
-        params[:ends_at] = Time.parse(params[:ends_at]).utc
-      end
-    end
-
     def can_user_update_attendance(user)
       !self.is_expired? &&
       self.post.user != user &&
@@ -195,7 +186,6 @@ module DiscoursePostEvent
           raw_invitees: event_params[:"allowed-groups"] ? event_params[:"allowed-groups"].split(',') : nil
         }
 
-        event.enforce_utc!(params)
         event.update_with_params!(params)
       elsif post.event
         post.event.destroy!
diff --git a/assets/javascripts/discourse/controllers/discourse-post-event-builder.js.es6 b/assets/javascripts/discourse/controllers/discourse-post-event-builder.js.es6
index d935eb5..35a70d7 100644
--- a/assets/javascripts/discourse/controllers/discourse-post-event-builder.js.es6
+++ b/assets/javascripts/discourse/controllers/discourse-post-event-builder.js.es6
@@ -136,9 +136,13 @@ export default Controller.extend(ModalFunctionality, {
     const eventParams = {};
 
     if (this.startsAt) {
-      eventParams.start = moment(this.startsAt).format("YYYY-MM-DDTHH:mm");
+      eventParams.start = moment(this.startsAt)
+        .utc()
+        .format("YYYY-MM-DD HH:mm");
     } else {
-      eventParams.start = moment().format("YYYY-MM-DDTHH:mm");
+      eventParams.start = moment()
+        .utc()
+        .format("YYYY-MM-DD HH:mm");
     }
 
     if (this.model.eventModel.status) {
@@ -152,7 +156,9 @@ export default Controller.extend(ModalFunctionality, {
     }
 
     if (this.endsAt) {
-      eventParams.end = moment(this.endsAt).format("YYYY-MM-DDTHH:mm");
+      eventParams.end = moment(this.endsAt)
+        .utc()
+        .format("YYYY-MM-DD HH:mm");
     }
 
     if (this.model.eventModel.status === "private") {

GitHub sha: 29d0c033