ENGINE-780, take 2: After normalizing to UTC, forget the offset. ENGINE-780-take2
authorJorg Knobloch
Thu, 30 Jul 2020 22:50:42 +0200
branchENGINE-780-take2
changeset 4910347f8b793204
parent 4909 10048803d2ac
child 4913 ceaa392217db
child 4917 fd04ee9fd6ad
ENGINE-780, take 2: After normalizing to UTC, forget the offset.
src/etpan_mime.c
     1.1 --- a/src/etpan_mime.c	Thu Jul 30 15:03:14 2020 +0200
     1.2 +++ b/src/etpan_mime.c	Thu Jul 30 22:50:42 2020 +0200
     1.3 @@ -549,8 +549,10 @@
     1.4      result->tm_year = et->dt_year - 1900;
     1.5      result->tm_gmtoff = 36L * (long) et->dt_zone;
     1.6  
     1.7 +    // Normalize to UTC and then forget the offset.
     1.8      time_t t = timegm_with_gmtoff(result);
     1.9      gmtime_r(&t, result);
    1.10 +    result->tm_gmtoff = 0;
    1.11  
    1.12      return result;
    1.13  }