Opened 10 years ago

Closed 6 years ago

#1617 closed defect (wontfix)

Calendar time data did not match

Reported by: anonymous Owned by: Petr Machata
Priority: highest Component: CalendarPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.10


I get this error when trying to add an event in the calendar. The time date that was entered as: 07/07/10. I also tried: 2007/07/10 ====================== Traceback (most recent call last):

File "D:\Python24\Lib\site-packages\trac\web\", line 406, in dispatch_request


File "D:\Python24\Lib\site-packages\trac\web\", line 237, in dispatch

resp = chosen_handler.process_request(req)

File "build\bdist.win32\egg\azcalendar\", line 305, in process_request File "build\bdist.win32\egg\azcalendar\", line 46, in process_add File "D:\Python24\Lib\", line 293, in strptime

raise ValueError("time data did not match format: data=%s fmt=%s" %

ValueError: time data did not match format: data=07/07/10 fmt=%Y/%m/%d %H:%M

Attachments (0)

Change History (6)

comment:1 Changed 10 years ago by anonymous

I also had the same error, and used the default dates.

Plesae fix.. this is a great and very useful plugin!

comment:2 Changed 10 years ago by Petr Machata

Status: newassigned

You have to enter dates in full format, including HH:MM component. E.g. "2007/03/28 15:30". This is certainly a bug, because the client-side should check that you provided meaningful values, and server side shouldn't fail if nonsense is entered, but it's easy to work around. I'm accepting the ticket, but I won't have time to work on my plugin for at least a month now. Sorry.

comment:3 Changed 10 years ago by anonymous

Ok cool. Could you possibly quickly make it at least default to a particular time like 09:00 (9AM) start and 18:00 (6PM) so that, if we forget to change it, it won't crash.

Other suggestions as I play with it are:

  1. Control to set # of months to display
  2. Ability to have 24HRS or set time range (like for a work day, 8AM - 6PM)
  3. When clicking on the item in the timeline view... it brings you back to the editor.. possibly have a admin/user view of it.
  4. In the editor - possibly have a text box area for comments about the item, so that when someone clicks on it as a (user, non admin) there's more info about the item.
  5. Mabye custom Event priority fields - for catorizing - similar to project management software.


comment:4 Changed 10 years ago by Petr Machata

Fixed the original problem in r2508. It now allows omitting the time component. If the time component is missing from begin time, the time component defaults to 0:00. If it's missing from end time, it defaults to 0:00 the next day. I'm leaving this report open to keep an eye on your other topics.

comment:5 Changed 8 years ago by peterA

Ok cool. Could you possibly quickly make it at least default to a particular time like 09:00 (9AM) start and 18:00 (6PM) ...

You can make a quick change in azcalendar/ (lines 53 and 54) by appending 09:00 to time_begin and 18:00 to time_end as shown below. The H:M will be displayed in the input boxes:

    def process_add(self, req):
        add_stylesheet (req, 'hw/css/azcalendar.css')

        if req.method == 'GET' and req.args.has_key('date'):
            req.hdf['azcalendar.time_begin'] = time.strftime("%Y/%m/%d 09:00",(time.strptime(req.args['date'],"%Y%m%d")))
            req.hdf['azcalendar.time_end']   = time.strftime("%Y/%m/%d 18:00",(time.strptime(req.args['date'],"%Y%m%d")))
            return 'add_event.cs', None

        elif req.method == 'GET' and req.args.has_key('new_event'):

comment:6 Changed 6 years ago by Ryan J Ollos

Resolution: wontfix
Status: assignedclosed

Modify Ticket

as closed The owner will remain Petr Machata.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.