Opened 12 years ago
Closed 12 years ago
#28 closed (fixed)
datetime setters need to use datetime.datetime as the type, rather than datetime
Reported by: | chaos@bbn.com | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 2012-09-04 client release |
Component: | Clients | Version: | |
Keywords: | Cc: | ||
Dependencies: |
Description
When i try to set a sliver creation time with the following code:
creation_time = datetime.datetime.fromtimestamp(int(sinfo['creation'])) print creation_time print type(creation_time) slivers[sliver].created = creation_time
I get this traceback:
2012-07-17 14:27:25 <type 'datetime.datetime'> Traceback (most recent call last): File "./report_relations", line 199, in <module> slivers[sliver].created = creation_time File "/home/chaos/gmoc.py", line 654, in created raise TypeError("created must be a datetime object") TypeError: created must be a datetime object
I think this is because the type of datetime objects from the datetime class is datetime.datetime
, not datetime
, so that's what you need to compare against.
Note: See
TracTickets for help on using
tickets.
This has been fixed:
now yields: