Skip to content

v0.6.6 - Refactor contextual timezone support

Compare
Choose a tag to compare
@jasonfb jasonfb released this 23 Oct 17:28
· 28 commits to main since this release
e3b0de8

• Major refactor of contextual timezone support

NEW INSTALL: your current_user object should have

(1) a field on the database time_zone (notice underscore) this is a string field storing the name of the Rails timezone,

(2) a method like

def timezone ActiveSupport::TimeZone[time_zone] end

(notice no underscore in method name) This method returns a TimeZone object

UPGRADING: you will need to convert your existing timezone fields which were previously offset integers into strings using a new string field on your user object time_zone (notice underscores)