MCPcopy Create free account
hub / github.com/apache/arrow / expected_time_value

Function expected_time_value

python/pyarrow/tests/test_convert_builtin.py:999–1007  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

997 return int(seconds * multiplier)
998
999 def expected_time_value(t):
1000 # only use with utc time object because it doesn't adjust with the
1001 # time objects tzdata
1002 if unit == 's':
1003 return t.replace(microsecond=0)
1004 elif unit == 'ms':
1005 return t.replace(microsecond=(t.microsecond // 1000) * 1000)
1006 else:
1007 return t
1008
1009 # only timezone naive times are supported in arrow
1010 data = [

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected