Skip to content

Commit

Permalink
Fixed issue #11606: Date/Time filed does not record the answer
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 26, 2016
1 parent 130b2d2 commit 611ea03
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions application/libraries/Date_Time_Converter.php
Expand Up @@ -94,13 +94,17 @@ public function __destruct() {
/** Private Function. Resets date and time unit variables to default
*/
private function _default_date_time_units() {
$this->seconds = '00';
$this->minutes = '00';
$this->hours = '00';
$this->days = '01';
$this->months = '01';
$this->years = '1970';
$this->ampm = 'am';
$this->seconds = '00';
$this->minutes = '00';
$this->hours = '00';

// Default must be set to "today", otherwise
// saving only hour will calculate wrong timestamp.
// See bug #11606.
$this->days = date('d');
$this->months = date('m');
$this->years = date('Y');
$this->ampm = 'am';
}


Expand Down

2 comments on commit 611ea03

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@olleharstedt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, hold on to your guts...

Please sign in to comment.