Index: modules/flexinode/field_timestamp.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexinode/field_timestamp.inc,v
retrieving revision 1.9
diff -u -r1.9 field_timestamp.inc
--- modules/flexinode/field_timestamp.inc	16 Sep 2004 14:34:00 -0000	1.9
+++ modules/flexinode/field_timestamp.inc	6 Oct 2004 23:08:42 -0000
@@ -5,6 +5,11 @@
   return t('date/time');
 }
 
+function flexinode_field_timestamp_settings() {
+  $group .= form_radios(t('Time notation preference'), 'flexinode_ampm', variable_get('flexinode_ampm', '0'), array('0' => t('24h'),'1' => t('12h')), t('The time notation system is used for entering times.'));
+  return form_group(t('Time notation'), $group);
+}
+
 function flexinode_field_timestamp_form($field, $node) {
   $fieldname = 'flexinode_'. $field->field_id;
   return form_item(t($field->label), flexinode_form_date($node->$fieldname, $fieldname), t($field->description), NULL, $field->required);
@@ -43,7 +48,7 @@
   // TODO: Make the years automatically populated instead of static.
 
   //determine settings for form's hour selector
-  if (variable_get('event_ampm', '0')) {
+  if (variable_get('flexinode_ampm', '0')) {
     $hour_format = 'g';
     $first_hour = 1;
     $last_hour = 12;
@@ -84,7 +89,7 @@
   $when .= form_select('', $prefix .'hour', $hour, $hours);
   $when .= ':';
   $when .= form_select('', $prefix .'minute', $minute, $minutes);
-  if (variable_get('event_ampm', '0')) {
+  if (variable_get('flexinode_ampm', '0')) {
     $when .= form_select('', $prefix .'ampm', $am_pm, $am_pms);
   }
   $when .= '</div></div>';
@@ -96,11 +101,11 @@
 function flexinode_validate_date(&$node, $prefix = '') {
   if (isset($node->{$prefix . 'year'}) && isset($node->{$prefix . 'month'}) && isset($node->{$prefix . 'day'}) && isset($node->{$prefix . 'hour'}) && isset($node->{$prefix . 'minute'})) {
     $hour = $node->{$prefix . 'hour'};
-    if (variable_get('event_ampm', '0')) {
-      if ($node->{$prefix . 'ampm'} == 'pm') {
+    if (variable_get('flexinode_ampm', '0')) {
+      if (($node->{$prefix . 'ampm'} == 'pm') && ($hour != 12)) {
         $hour += 12;
       }
-      elseif ($hour == 12) {
+      elseif (($node->ampm == 'am') && ($hour == 12)) {
         $hour -= 12;
       }
     }
@@ -140,4 +145,4 @@
 
 /** @} End of addtogroup themeable */
 
-?>
\ No newline at end of file
+?>
