diff --git a/core/lib/Drupal/Core/Datetime/Element/Datetime.php b/core/lib/Drupal/Core/Datetime/Element/Datetime.php
index 7637ad1..3c4ff43 100644
--- a/core/lib/Drupal/Core/Datetime/Element/Datetime.php
+++ b/core/lib/Drupal/Core/Datetime/Element/Datetime.php
@@ -75,11 +75,6 @@ public static function valueCallback(&$element, $input, FormStateInterface $form
       $time_format = $element['#date_time_element'] != 'none' ? static::getHtml5TimeFormat($element) : '';
       $timezone = !empty($element['#date_timezone']) ? $element['#date_timezone'] : NULL;
 
-      // Seconds will be omitted in a post in case there's no entry.
-      if (!empty($time_input) && strlen($time_input) == 5) {
-        $time_input .= ':00';
-      }
-
       try {
         $date_time_format = trim($date_format . ' ' . $time_format);
         $date_time_input = trim($date_input . ' ' . $time_input);
diff --git a/core/modules/datetime/src/Tests/DateFormTest.php b/core/modules/datetime/src/Tests/DateFormTest.php
new file mode 100644
index 0000000..ee3de10
--- /dev/null
+++ b/core/modules/datetime/src/Tests/DateFormTest.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\datetime\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests Datetime field functionality.
+ *
+ * @group datetime
+ */
+class DateFormTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('datetime', 'datetime_test');
+
+  function testTimeField() {
+    $this->drupalGet('datetime-test/date-form-test');
+
+    $edit = [
+      'datetime_with_seconds[date]' => '2016-01-02',
+      'datetime_with_seconds[time]' => '13:14:15',
+      'datetime_without_seconds[date]' => '2016-03-04',
+      'datetime_without_seconds[time]' => '16:17',
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Submit');
+
+    $success = $this->xpath('//div[contains(@class, "messages--status")]');
+    $this->assertTrue($success, 'Success message found.');
+
+    foreach ($edit as $name => $value) {
+      $input = $this->xpath('//input[@name=:name and @value=:value]', [
+        ':name' => $name,
+        ':value' => $value
+      ]);
+      $this->assertTrue(!empty($input), $name);
+    }
+  }
+
+}
diff --git a/core/modules/datetime/tests/modules/datetime_test/datetime_test.routing.yml b/core/modules/datetime/tests/modules/datetime_test/datetime_test.routing.yml
new file mode 100644
index 0000000..b3d376e
--- /dev/null
+++ b/core/modules/datetime/tests/modules/datetime_test/datetime_test.routing.yml
@@ -0,0 +1,7 @@
+datetime_test.date_form_test:
+  path: '/datetime-test/date-form-test'
+  defaults:
+    _form: '\Drupal\datetime_test\Form\DateForm'
+    _title: 'Date form test'
+  requirements:
+    _access: 'TRUE'
\ No newline at end of file
diff --git a/core/modules/datetime/tests/modules/datetime_test/src/Form/DateForm.php b/core/modules/datetime/tests/modules/datetime_test/src/Form/DateForm.php
new file mode 100644
index 0000000..7f63d5d
--- /dev/null
+++ b/core/modules/datetime/tests/modules/datetime_test/src/Form/DateForm.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace Drupal\datetime_test\Form;
+
+use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Date and Datetime fields test form.
+ */
+class DateForm extends FormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'date_form_test';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+    $form['datetime_with_seconds'] = [
+      '#type' => 'datetime',
+      '#title' => $this->t('Datetime with seconds'),
+      '#default_value' => NULL,
+      '#date_time_element' => 'text',
+      '#date_time_format' => 'H:i:s',
+    ];
+
+    $form['datetime_without_seconds'] = [
+      '#type' => 'datetime',
+      '#title' => $this->t('Datetime without seconds'),
+      '#default_value' => NULL,
+      '#date_time_element' => 'text',
+      '#date_time_format' => 'H:i',
+    ];
+
+    $form['actions'] = [
+      '#type' => 'actions',
+      'submit' => [
+        '#type' => 'submit',
+        '#value' => $this->t('Submit'),
+      ],
+    ];
+
+    return $form;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    $form_state->setRebuild();
+
+    drupal_set_message($this->t('Success'));
+  }
+
+}
