The epoch calculation for stime inrange calculation was wrong 1 day to early. Therefore processes are killed that shouldn't be killed.
Suspect due to wrong calculation of leap year.  the code is complicated and replaced it by mktime() calls

Also adjusted the verbose message and show the calculated process epcoch time, eg:
    Selection filter matched absolute 'STIME/START' = '10:47(1370594820)' in [1339065675,1370598075]

I like the defintion of leap day, from the dutch wikipedia:
"In different cultures (such as Norway) Leap traditionally a day on which women men may invite a date. Also the marriage
proposal is subject. February 29, traditionally the role reversal"

(cherry picked from commit b7997b88bf6f52d18659bd1bc0499680967fb2a8)

Include ChangeLog update.
Fix possible buffer overflow.

(cherry picked from commit 47a131871720268f2162278d915404d65052d9c8)
Be a bit more descriptive about package promise changes.
Merge pull request #1106 from kacfengine/3.5.x

[3.5.x] Be a bit more descriptive about package promise changes.
Implemented safe_open() in order to avoid symlink race conditions.

It makes sure that we do not follow unsafe symlinks, that is a link
that belongs to a user, but has a target owned by a different user.
It does this in a way that avoids race conditions (between testing if
a file is a link, and opening that file, there is a small window of
opportunity).

Also implements safe_chdir(), to also safeguard chdir() operations.

Fixes issue #3693.
(cherry picked from commit 995b9d18d750713cd40ce0203550a45646a53cd0)

Conflicts:

	cf-agent/files_editline.c
	cf-agent/verify_files.c
	cf-agent/verify_packages.c
	cf-execd/cf-execd-runner.c
	cf-key/cf-key-functions.c
	cf-serverd/server_common.c
	configure.ac
	libcfnet/client_code.c
	libpromises/cf3lex.l
	libpromises/env_context.c
	libpromises/parser.c
	libpromises/pipes_unix.c
	libpromises/sysinfo.c
	libpromises/verify_reports.c
	libutils/hashes.c
	tests/unit/Makefile.am
Merge pull request #1116 from kacfengine/safe_open_3.5.x

[3.5.x] Implemented safe_open() in order to avoid symlink race conditions.
Work around fdopendir() missing on some platforms.
(cherry picked from commit 19be8b73b5ee94b890ca09ccf7346ea923b36c1c)
Merge pull request #1118 from kacfengine/safe_open_3.5.x

[3.5.x] Work around fdopendir() missing on some platforms.
Add missing header.
Merge pull request #1122 from kacfengine/safe_open_3.5.x

Add missing header.
Don't use O_DIRECTORY flag, which is Linux specific.

Directories will fail when we try to chdir into them anyway, so all
we lose is the early warning.
(cherry picked from commit fd0488f19bc8325bbb51171dd6fc69b074d2b51c)
Switch back to test folder after each test.

Otherwise the test framework may try to write into the wrong
directory.
(cherry picked from commit 7828a2ad7a4efb1799b8c9208c33e03f3af83aea)
Merge pull request #1124 from kacfengine/safe_open_3.5.x

[3.5.x] Some fixes for the safe_open() function.
Don't use GetErrorStrFromCode(), which is not defined in 3.5.x.
Merge pull request #1126 from kacfengine/safe_open_3.5.x

[3.5.x] Don't use GetErrorStrFromCode(), which is not defined in 3.5.x.
Pre-release version bump