Skip to content

Commit

Permalink
Merge pull request #83 from snuhcs-course/fix/meetup-order
Browse files Browse the repository at this point in the history
약속 정렬
  • Loading branch information
leeeryboy authored Dec 7, 2023
2 parents 7bd50ee + 5798641 commit db20a93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend/app/controllers/meet_ups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ class MeetUpsController < ApplicationController
skip_before_action :verify_authenticity_token

def index
@meet_ups = current_user.meet_ups
@meet_ups = current_user.meet_ups.where('meet_at > ?', Time.now)
.order(meet_at: :asc)
render json: @meet_ups
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object GsonProvider {

@RequiresApi(Build.VERSION_CODES.O)
val localDateTimeSerializer = JsonSerializer<LocalDateTime> { src, _, _ ->
val zonedDateTime = src.atOffset(ZoneOffset.UTC)
val zonedDateTime = src.atZone(ZoneId.systemDefault()).withZoneSameInstant(ZoneOffset.UTC)
JsonPrimitive(zonedDateTime.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME))
}

Expand Down

0 comments on commit db20a93

Please sign in to comment.