X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Femailer.cc;h=57b06ed616663cc05e4b2cecb38a2ad3d9e20567;hb=b733ff51f0212d02dbf33ccb62e67f07941f5ace;hp=8effc19bcf6de0d51f7cb82733af7a2760d53a7c;hpb=bd12168f1381e8e5fb197e5f25cf716fcf012010;p=dcpomatic.git diff --git a/src/lib/emailer.cc b/src/lib/emailer.cc index 8effc19bc..57b06ed61 100644 --- a/src/lib/emailer.cc +++ b/src/lib/emailer.cc @@ -108,7 +108,7 @@ Emailer::send (string server, int port, string user, string password) boost::posix_time::ptime const utc_now = boost::posix_time::second_clock::universal_time (); boost::posix_time::ptime const local_now = boost::date_time::c_local_adjustor::utc_to_local (utc_now); boost::posix_time::time_duration offset = local_now - utc_now; - sprintf (date_buffer + strlen(date_buffer), "%s%02d%02d", (offset.hours() >= 0 ? "+" : "-"), abs (offset.hours()), offset.minutes()); + sprintf (date_buffer + strlen(date_buffer), "%s%02d%02d", (offset.hours() >= 0 ? "+" : "-"), int(abs(offset.hours())), int(offset.minutes())); _email = "Date: " + string(date_buffer) + "\r\n" "To: " + address_list (_to) + "\r\n" @@ -219,7 +219,7 @@ Emailer::send (string server, int port, string user, string password) CURLcode const r = curl_easy_perform (curl); if (r != CURLE_OK) { - throw KDMError (String::compose (_("Failed to send email (%1)"), curl_easy_strerror (r))); + throw KDMError (_("Failed to send email"), curl_easy_strerror (r)); } curl_slist_free_all (recipients);