Closed (outdated)
Project:
Event
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2008 at 01:18 UTC
Updated:
13 Apr 2018 at 21:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
co_photobug commentedThis is happening when editing my events, too. I am using Drupal 5.5 and Events 5.x-1.0.
Comment #2
Patrick Nelson commentedHappens with mine too. Using Drupal 5.7 and event.module 1.215.2.16 (5.x-1.x-dev dated 2007-Sep-09)
Regards
Patrick
Comment #3
Patrick Nelson commentedFurther info -> This only happens when the settings are set to 24h (as opposed to 12h) in Event > Timezone Handling (/admin/settings/event/timezone)
Regards
Patrick
Comment #4
cmillet1 commentedI'm having this problem as well. Changing to 12hr format "fixed" it for me, but still wondering if there's been resolutions to this.
Comment #5
yassubscribing
Comment #6
dingbats commentedThe
#default_valuereturned from_event_date()is a two-digit string, when the form renderer expects a number.In the form rendering process PHP coerces the string into a number, which means strings "01" to "09" become the number 0. For example, if you set the hour to "01","01" (string)is coerced into0 (int); however,"10" (string)becomes10 (int), so hours 10 or larger are unaffected.This effect can be observed in the minute field too.
Please review the attached patch which corrects this issue.
EDIT: Sorry, it had nothing to do with type coercion, but it is in the form rendering process, specifically
form.inc#form_select_options():The important section is
(string)$element['#value'] === $key, which is comparing"01" === "1".Comment #7
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.