             @userTimezone = users[0].timezone
 
         next()
+, except: ['delete']
 
-
-, except: ['delete']
+## Actions
 
 action 'all', ->
     Event.all (err, events) =>

        if err?
            send error: true, msg: "Server error while saving event", 500
        else
            evt = @convertEventDate(evt, @userTimezone)
            send evt, 200


# Make this pre-treatment only before update and delete action.
, except: ['create', 'all']

# Initialize convertEvenDate and userTimezone 
before ->
    @convertEventDate = (evt, timezone) ->
        # Convert dates from UTC to user timezone
        timezonedDate = new time.Date(evt.start, 'UTC')
        timezonedDate.setTimezone(timezone)
        evt.start = timezonedDate.toString().slice(0, 24)
