Closed (won't fix)
Project:
Event
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2008 at 10:15 UTC
Updated:
2 Dec 2008 at 14:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
abamarus commentedThere are several issure I have resolved by hacking away in the module.
The default timezone stuff relies on the database having the same stuff in it that is hard coded into the module. To get rid of some of the timezones (including the one that the module uses as it's default) required hacking the id's in the module - in my case I wanted to change the default 0 offset from europe/london to GB so in function event_timezone_map I edited the id at line 3161 to be 380, which is the id from the database.
I think there must be a better way of doing this rather then having hard coded values. Perhaps a feature request for disabling timezones we don't want from the admin pages?
The next bug I made a hack to fix is previewing an event - it was causing errors because it was trying to turn a date from a string into an array when the date was already an array. I fixed this in the event_explode_date function by wrapping everything is an is_array test. If the parameter $date is already an array return it, otherwise do the other stuff. This would be line 2733.
This only leaves me with l10n issues with the output. Currently all dates are displayed in US format even though the time is given in local time for the user. I have not seen an easy solution to this.
I'd create a patch but I have no idea how!!! Plus my hacks are a bit on the sloppy side so it wouldn;t be the best patch ever.
I hope the info is useful to someone who can do a proper fix. Any help with the display issue gratefully accepted.
Comment #2
abamarus commentedI have also created a template for our theme directory that removes the time from events that have no time. I've attached it here for those who are interested in it.
Comment #3
abamarus commentedI got around the timezone display issue by changing the output formats to use the name of the month instead of the number - that way both the US users and the UK users are equally confused by the date format!!
I also had to assign a custom format to the site wide time zone, again to use the month name instead of the month number.
Again a hack but at least it gets the module is a usable state.
Comment #4
killes@www.drop.org commentedI am not sure I fully understand what is going on and how to try reproduce this problem.
Can you paste the event related variables from the variables table?
Is the new user you mention trying to create an event or is he viewing one?
Comment #5
abamarus commentedThe new user is trying to create an event.
Reproduce by going into the event_timezones table and removing a few timezones - which is the only way of making a site that only has a relevant subset of timezones available. My event_timezones table contains timezone id 380, 474 to 479 and 481 to 484.
Because of the hard coded nature of the timezone handling in the event module this will break things for you quite nicely.
Comment #6
kecinzer commentedEven if I set timezone, I still see this - "Date Timezone requirements: The Date Timezone module requires you to set the site timezone name."
Comment #7
pcool commentedI have the same bug. I solved it by allowing the user to set the timezone when adding an event (go to
Administer > Site configuration > Events > timezone handling
Event time zone input: *
0 Use the sitewide time zone
0 Use the time zone of the user editing or creating the event
V Allow users to set event time zones
Comment #8
killes@www.drop.org commentedSo it appears you hacked the timezone table and now you complained that it doesn't work anymore? :p
Comment #9
killes@www.drop.org commentedThe proper way to restrict the timezone choices for a user is the form_alter hook, not hacking the tz table.