convert timesheets to UTC with support for user timezone (#372)

This commit is contained in:
Kevin Papst
2019-02-08 18:24:33 +01:00
committed by GitHub
parent 8dcc18dde3
commit d00596d297
58 changed files with 1637 additions and 207 deletions

View File

@@ -256,7 +256,7 @@ class ProfileControllerTest extends ControllerBaseTest
'user_preferences_form' => [
'preferences' => [
['name' => UserPreference::HOURLY_RATE, 'value' => 37.5],
// ['name' => 'timezone', 'value' => 'America/Creston'],
['name' => 'timezone', 'value' => 'America/Creston'],
['name' => 'language', 'value' => 'ar'],
['name' => UserPreference::SKIN, 'value' => 'blue'],
['name' => 'theme.fixed_layout', 'value' => false],
@@ -280,7 +280,7 @@ class ProfileControllerTest extends ControllerBaseTest
$user = $this->getUserByName($em, $username);
$this->assertEquals($hourlyRate, $user->getPreferenceValue(UserPreference::HOURLY_RATE));
//$this->assertEquals('', $user->getPreferenceValue('America/Creston'));
$this->assertEquals('', $user->getPreferenceValue('America/Creston'));
$this->assertEquals('ar', $user->getPreferenceValue('language'));
$this->assertEquals('blue', $user->getPreferenceValue(UserPreference::SKIN));
$this->assertEquals(false, $user->getPreferenceValue('theme.fixed_layout'));

View File

@@ -116,6 +116,11 @@ class TimesheetControllerTest extends ControllerBaseTest
$client->submit($form, [
'timesheet_edit_form' => [
'description' => 'Testing is fun!',
// begin is always pre-filled with the current datetime
// 'begin' => null,
// end must be allowed to be null, to start a record
// there was a bug with end begin required, so we manually set this field to be empty
'end' => null,
'project' => 1,
'activity' => 1,
]