The views date handler for some reason doesn't allow minute or second granularity.

There is this code in date_views_argument_handler_simple::options_form():

<?php
    $options = $this->date_handler->date_parts();
    unset($options['second'], $options['minute']);
    $options += array('week' => t('Week', array(), array('context' => 'datetime')));
    $form['granularity'] = array(
      '#title' => t('Granularity'),
      '#type' => 'radios',
      '#options' => $options,
      '#default_value' => $this->options['granularity'],
      '#multiple' => TRUE,
      '#description' => t("Select the type of date value to be used in defaults, summaries, and navigation. For example, a granularity of 'month' will set the default date to the current month, summarize by month in summary views, and link to the next and previous month when using date navigation."),
    );
?>

There is no comment to say why this is but it seems like something people might want to do (I know I want to do it).

The fact that this code very specifically removes these options makes me think there is a reason but I don't know what it might be.

Alternatively a unix timestamp argument would be very useful.

Comments

rooby’s picture

Status: Active » Closed (won't fix)

ah whoops, I just realised that is for summaries/navigation etc.