lib/netsuite/utilities.rb
# use when sending times to NS
use when sending times to NS
use when sending times to NS
def normalize_datetime_to_netsuite(datetime)
      is_dst = Time.parse(datetime.to_s).dst?
      datetime.new_offset(0) + datetime.offset + Rational(is_dst ? 5 : 6, 24)
    end
def normalize_datetime_to_netsuite ( datetime ) is_dst = Time . parse ( datetime . to_s ) . dst? datetime . new_offset ( 0 ) + datetime . offset + Rational ( is_dst ? 5 : 6 , 24 ) end
use when sending times to NS
use when sending times to NS
# normalize the time to UCT0 # add 6 hours (21600 seconds) of padding (CST offset) # to force the same time to be displayed in the NS UI
datetime
<not_specific>