This patch almost implements what he wanted. The problem is that jscalendar has no format specifier for the time zone, so you have to hard code that in for now. After patching node.module, edit line 1640 and replace the -700 with your time zone setting.

This can be applied after jscalendar adds that format. (I'll post a feature request on the jstools module and let them deal with upstream.)

CommentFileSizeAuthor
jscal_authored_on.patch.txt1.41 KBbinford2k
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo’s picture

Project: Drupal core » Javascript Tools
Version: 4.7.3 » master
Component: node system » Jscalendar

Thanks for the patch. This should be done through a hook_form_alter in javascript tools module. Something like (untested):

/**
 * Generate a form for selecting terms to associate with a node.
 */
function jscalendar_form_alter($form_id, &$form) {
  if (variable_get('jscalendar_alter_node_form', FALSE) && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
  $extra = array(
    '#attributes' => array('class' => 'jscalendar'),
    '#jscalendar_ifFormat' => '%Y-%m-%d %H:%M:%S -700'),
  );
  if ($form['author']['date']) {
    $form['author']['date'] += $extra;
  }
}

This assumes a _settings function to allow users to turn this off.

thelarry8675309’s picture

Thank you very much the patch solved my problem.