Skip to content
Snippets Groups Projects
Commit 9f99c8c2 authored by Owen Bush's avatar Owen Bush
Browse files

Removed seconds from timestamp

parent 83905923
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,7 @@ class ConsecutiveRecurringDate extends DateRangeItem implements RecurringEventsF
&& !empty($user_input['consecutive_recurring_date'][0]['time'])) {
$time = $user_input['consecutive_recurring_date'][0]['time'];
$time_parts = static::convertTimeTo24hourFormat($time);
$timestamp = implode(':', $time_parts) . ':00';
$timestamp = implode(':', $time_parts);
$start_timestamp = $user_input['consecutive_recurring_date'][0]['value']['date'] . 'T' . $timestamp;
$start_date = DrupalDateTime::createFromFormat(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $start_timestamp, $user_timezone);
$start_date->setTime(0, 0, 0);
......
......@@ -96,7 +96,7 @@ class DailyRecurringDate extends DateRangeItem implements RecurringEventsFieldTy
$time = $user_input['daily_recurring_date'][0]['time'];
$time_parts = static::convertTimeTo24hourFormat($time);
$timestamp = implode(':', $time_parts) . ':00';
$timestamp = implode(':', $time_parts);
$start_timestamp = $user_input['daily_recurring_date'][0]['value']['date'] . 'T' . $timestamp;
$start_date = DrupalDateTime::createFromFormat(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $start_timestamp, $user_timezone);
......
......@@ -120,7 +120,7 @@ class MonthlyRecurringDate extends WeeklyRecurringDate implements RecurringEvent
$time = $user_input['monthly_recurring_date'][0]['time'];
$time_parts = static::convertTimeTo24hourFormat($time);
$timestamp = implode(':', $time_parts) . ':00';
$timestamp = implode(':', $time_parts);
$start_timestamp = $user_input['monthly_recurring_date'][0]['value']['date'] . 'T' . $timestamp;
$start_date = DrupalDateTime::createFromFormat(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $start_timestamp, $user_timezone);
......
......@@ -85,7 +85,7 @@ class WeeklyRecurringDate extends DailyRecurringDate implements RecurringEventsF
$time = $user_input['weekly_recurring_date'][0]['time'];
$time_parts = static::convertTimeTo24hourFormat($time);
$timestamp = implode(':', $time_parts) . ':00';
$timestamp = implode(':', $time_parts);
$start_timestamp = $user_input['weekly_recurring_date'][0]['value']['date'] . 'T' . $timestamp;
$start_date = DrupalDateTime::createFromFormat(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, $start_timestamp, $user_timezone);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment