Convert the given Time/DateTime object into the database timezone, used when literalizing objects in an SQL string.
# File lib/sequel/timezones.rb, line 21 def application_to_database_timestamp(v) convert_output_timestamp(v, Sequel.database_timezone) end
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 def database_to_application_timestamp(v) convert_timestamp(v, Sequel.database_timezone) end
Sets the database, application, and typecasting timezones to the given timezone.
# File lib/sequel/timezones.rb, line 33 def default_timezone=(tz) self.database_timezone = tz self.application_timezone = tz self.typecast_timezone = tz 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 def typecast_to_application_timestamp(v) convert_timestamp(v, Sequel.typecast_timezone) end
Generated with the Darkfish Rdoc Generator 2.