protected function FeedsDateTime::toArray in Feeds 8.2
Helper to return all standard date parts in an array.
1 call to FeedsDateTime::toArray()
- FeedsDateTime::setTimezone in lib/
Drupal/ feeds/ FeedsDateTime.php - Overrides default DateTime function. Only changes output values if actually had time granularity. This should be used as a "converter" for output, to switch tzs.
File
- lib/
Drupal/ feeds/ FeedsDateTime.php, line 195
Class
- FeedsDateTime
- Extend PHP DateTime class with granularity handling, merge functionality and slightly more flexible initialization parameters.
Namespace
Drupal\feedsCode
protected function toArray() {
return array(
'year' => $this
->format('Y'),
'month' => $this
->format('m'),
'day' => $this
->format('d'),
'hour' => $this
->format('H'),
'minute' => $this
->format('i'),
'second' => $this
->format('s'),
'zone' => $this
->format('e'),
);
}