Code

Opened 8 years ago

Closed 8 years ago

#2460 closed defect (fixed)

datetime.datetime never gets processed in JSON serialization

Reported by: jyrki.pulliainen@… Owned by: adrian
Component: Core (Other) Version: master
Severity: normal Keywords: json datetime
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This bug was originally reported by siniy (see: http://tinyurl.com/z4xov [link to userlist conversation in Google Groups])

When using JSON serialization, in function default in class DateTimeAwareJSONEncoder datetime.datetime never gets properly processed because datetime.datetime is a subclass of datetime.date and isinstance(o, datetime.date) is True even in case of o being an instance of datetime.datetime.

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [3501]) Fixed #2460 -- JSON serializer now correctly handles datetime objects. Thanks, siniy and jyrki.pulliainen@….

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.