Correct time zone of API dates
Prior to this change, the API returned incorrect dates in UTC instead of the conference time zone.
This commit is contained in:
parent
397341a324
commit
6ce2e66f14
4 changed files with 24 additions and 8 deletions
|
|
@ -3,8 +3,11 @@
|
|||
class EventScheduleSerializer < ActiveModel::Serializer
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
attribute :start_time, key: :date
|
||||
attributes :room
|
||||
attributes :date, :room
|
||||
|
||||
def date
|
||||
object.start_time&.change(zone: object.event.program.conference.timezone)
|
||||
end
|
||||
|
||||
def room
|
||||
object.room.guid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue