mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Prior to this change, the API returned incorrect dates in UTC instead of the conference time zone.
15 lines
295 B
Ruby
15 lines
295 B
Ruby
# frozen_string_literal: true
|
|
|
|
class EventScheduleSerializer < ActiveModel::Serializer
|
|
include ActionView::Helpers::TextHelper
|
|
|
|
attributes :date, :room
|
|
|
|
def date
|
|
object.start_time&.change(zone: object.event.program.conference.timezone)
|
|
end
|
|
|
|
def room
|
|
object.room.guid
|
|
end
|
|
end
|