Possible Bug in 3.0.0
Possible Bug in 3.0.0
Today I tried to add an absence for an employee using the same method I've been using for months. The absence however appears on the day prior to when it should. For example if I add an absence for Nov 13th, it shows up on the 12th. I can work around this by adding it on the day after the proper day but this looks like a bug?
Thanks for sending us the debug information, I passed it on to our developers and they confirmed its a bug with the new timezone handling in v3.0 specifically when entering time when "todays" date is before the DST switchover and the date you entering time for is after the DST switchover.
Its a one-line fix, if you edit: classes/modules/core/UserDateFactory.class.php, and around line: 180 you will find the following function definition:
Immediately after this line change it so it looks like this:
You will need to re-enter all time after the DST switchover date once this change is made of course.
v3.0.1 of TimeTrex, once released, will include this fix.
Its a one-line fix, if you edit: classes/modules/core/UserDateFactory.class.php, and around line: 180 you will find the following function definition:
Code: Select all
static function findOrInsertUserDate($user_id, $date, $timezone = NULL ) {
Code: Select all
static function findOrInsertUserDate($user_id, $date, $timezone = NULL ) {
$date = TTDate::getMiddleDayEpoch( $date );
v3.0.1 of TimeTrex, once released, will include this fix.