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

Function escape_time

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

Source from the content-addressed store, hash-verified

117
118
119def escape_time(obj, mapping=None):
120 if obj.microsecond:
121 fmt = "'{0.hour:02}:{0.minute:02}:{0.second:02}.{0.microsecond:06}'"
122 else:
123 fmt = "'{0.hour:02}:{0.minute:02}:{0.second:02}'"
124 return fmt.format(obj)
125
126
127def escape_datetime(obj, mapping=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected