server/sqlutils.py
branchtls-sprint
changeset 1026 4c097dbaf560
parent 1016 26387b836099
child 1132 96752791c2b6
equal deleted inserted replaced
1025:aebf37f460c1 1026:4c097dbaf560
   162                 # XXX <3.2 bw compat
   162                 # XXX <3.2 bw compat
   163                 elif type(val) is DateTimeType:
   163                 elif type(val) is DateTimeType:
   164                     warn('found mx date time instance, please update to use datetime',
   164                     warn('found mx date time instance, please update to use datetime',
   165                          DeprecationWarning)
   165                          DeprecationWarning)
   166                     val = datetime(val.year, val.month, val.day,
   166                     val = datetime(val.year, val.month, val.day,
   167                                    val.hour, val.minute, val.second)
   167                                    val.hour, val.minute, int(val.second))
   168                 elif type(val) is DateTimeDeltaType:
   168                 elif type(val) is DateTimeDeltaType:
   169                     warn('found mx date time instance, please update to use datetime',
   169                     warn('found mx date time instance, please update to use datetime',
   170                          DeprecationWarning)
   170                          DeprecationWarning)
   171                     val = timedelta(0, val.seconds, 0)
   171                     val = timedelta(0, int(val.seconds), 0)
   172                 args[key] = val
   172                 args[key] = val
   173             # should not collide
   173             # should not collide
   174             args.update(query_args)
   174             args.update(query_args)
   175             return args
   175             return args
   176         return query_args
   176         return query_args