lib/workato/connector/sdk/dsl/time.rb in workato-connector-sdk-1.0.1 vs lib/workato/connector/sdk/dsl/time.rb in workato-connector-sdk-1.0.2

- old
+ new

@@ -1,5 +1,6 @@ +# typed: true # frozen_string_literal: true module Workato module Connector module Sdk @@ -17,9 +18,14 @@ end end end begin + if ENV['TZ'].present? && ENV['TZ'] != 'UTC' + warn "WARNING: TZ environment variable is set to '#{ENV['TZ']}'. Set TZ=UTC for consistency with Workato platform'" + else + ENV['TZ'] = 'UTC' + end ::Time.zone = Workato::Connector::Sdk::DEFAULT_TIME_ZONE rescue TZInfo::DataSourceNotFound puts '' puts "tzinfo-data is not present. Please install gem 'tzinfo-data' by 'gem install tzinfo-data'" puts ''