Method: SheetsV4.default_spreadsheet_tz

Defined in:
lib/sheets_v4.rb

.default_spreadsheet_tz

This method returns an undefined value.

Set the default time zone for date and time conversions

Valid time zone names are those listed in one of these two sources:

  • ActiveSupport::TimeZone.all.map { |tz| tz.tzinfo.name }
  • ActiveSupport::TimeZone.all.map(&:name)

If you want to set the timezone to the time zone of the system's local time, you could use the timezone_local gem.

Examples:

SheetsV4.default_spreadsheet_tz = 'America/Los_Angeles'

Set the time zone to the system's local time

require 'timezone_local'
SheetsV4.default_spreadsheet_tz = TimeZone::Local.get.name


110
111
112
# File 'lib/sheets_v4.rb', line 110

def default_spreadsheet_tz
  @default_spreadsheet_tz || raise('default_spreadsheet_tz not set')
end