(obj, mapping=None)
| 125 | |
| 126 | |
| 127 | def escape_datetime(obj, mapping=None): |
| 128 | if obj.microsecond: |
| 129 | fmt = ( |
| 130 | "'{0.year:04}-{0.month:02}-{0.day:02}" |
| 131 | + " {0.hour:02}:{0.minute:02}:{0.second:02}.{0.microsecond:06}'" |
| 132 | ) |
| 133 | else: |
| 134 | fmt = "'{0.year:04}-{0.month:02}-{0.day:02} {0.hour:02}:{0.minute:02}:{0.second:02}'" |
| 135 | return fmt.format(obj) |
| 136 | |
| 137 | |
| 138 | def escape_date(obj, mapping=None): |
no outgoing calls
no test coverage detected