1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Two fixes for dtmail

This commit is contained in:
Ulrich Wilkens 2012-08-30 03:09:48 +02:00 committed by Jon Trulson
parent 3a28782409
commit 5c68d52ce4
3 changed files with 10 additions and 1 deletions

View file

@ -2608,7 +2608,9 @@ MsgScrollingList::formatHeader(DtMailHeaderLine & info,
{
DtMailValueDate ds = ((info.header_values[1])[0])->toDate();
if (ds.dtm_date && ds.dtm_tz_offset_secs)
#define USE_MAX_TZ_SECONDS (60 * 60 * 12)
if (ds.dtm_date && ds.dtm_tz_offset_secs >= -USE_MAX_TZ_SECONDS
&& ds.dtm_tz_offset_secs <= USE_MAX_TZ_SECONDS)
{
#define USE_YEAR_FORMAT_SECONDS (60 * 60 * 24 * 180)
time_t now;

View file

@ -133,8 +133,13 @@ class Application : public UIComponent {
virtual void shutdown() = 0;
// Functions to manipulate group execution privileges
#if defined(CSRG_BASED)
void disableGroupPrivileges(void) { (void) setegid(_originalRgid); }
void enableGroupPrivileges(void) { (void) setegid(_originalEgid); }
#else
void disableGroupPrivileges(void) { (void) setgid(_originalRgid); }
void enableGroupPrivileges(void) { (void) setgid(_originalEgid); }
#endif
gid_t originalEgid(void) { return _originalEgid; }
gid_t originalRgid(void) { return _originalRgid; }

View file

@ -493,6 +493,8 @@ RFCValue::toDate(void)
date.dtm_date = SafeMktime(&new_time);
#ifdef SVR4
date.dtm_tz_offset_secs = timezone;
#else
date.dtm_tz_offset_secs = new_time.tm_gmtoff;
#endif
}
else {