impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yyzzjj (JIRA)" <>
Subject [jira] [Created] (IMPALA-5539) utc_to_unix_micros udf have time zone problem
Date Tue, 20 Jun 2017 10:41:00 GMT
yyzzjj created IMPALA-5539:

             Summary: utc_to_unix_micros  udf  have time zone problem
                 Key: IMPALA-5539
             Project: IMPALA
          Issue Type: Bug
          Components: be, Frontend
    Affects Versions: Impala 2.9.0
            Reporter: yyzzjj
            Priority: Critical

our impalad  start with  flag  use_local_tz_for_unix_timestamp_conversions = true
so  be  timeconversion  use local time zone

 Frontend   Kuduscannode  callutc_to_unix_micros  function   got time (not handle local
time zone branch)

inline bool TimestampValue::UtcToUnixTime(time_t* unix_time) const {
  DCHECK(unix_time != nullptr);
  if (UNLIKELY(!HasDateAndTime())) return false;
  const boost::posix_time::ptime temp(date_, time_);
  tm temp_tm = boost::posix_time::to_tm(temp);
  // TODO: Conversion using libc is very expensive (IMPALA-5357); find an alternative.
    *unix_time = timegm(&temp_tm);
  return true;

beijing/china  is UTC + 8, return wrong result

This message was sent by Atlassian JIRA

View raw message