Module | Sequel::Timezones |
In: |
lib/sequel/timezones.rb
|
application_timezone | [R] | |
database_timezone | [R] | |
typecast_timezone | [R] |
Convert the given object into an object of Sequel.datetime_class in the application_timezone. Used when coverting datetime/timestamp columns returned by the database.
# File lib/sequel/timezones.rb, line 28 28: def database_to_application_timestamp(v) 29: convert_timestamp(v, Sequel.database_timezone) 30: end
Sets the database, application, and typecasting timezones to the given timezone.
# File lib/sequel/timezones.rb, line 33 33: def default_timezone=(tz) 34: self.database_timezone = tz 35: self.application_timezone = tz 36: self.typecast_timezone = tz 37: end
Convert the given object into an object of Sequel.datetime_class in the application_timezone. Used when typecasting values when assigning them to model datetime attributes.
# File lib/sequel/timezones.rb, line 42 42: def typecast_to_application_timestamp(v) 43: convert_timestamp(v, Sequel.typecast_timezone) 44: end