MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / escape_time

Function escape_time

pymysql/converters.py:114–119  ·  view source on GitHub ↗
(obj, mapping=None)

Source from the content-addressed store, hash-verified

112
113
114def escape_time(obj, mapping=None):
115 if obj.microsecond:
116 fmt = "'{0.hour:02}:{0.minute:02}:{0.second:02}.{0.microsecond:06}'"
117 else:
118 fmt = "'{0.hour:02}:{0.minute:02}:{0.second:02}'"
119 return fmt.format(obj)
120
121
122def escape_datetime(obj, mapping=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected