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