mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #26498 -- Fixed TimeField microseconds round-tripping on MySQL and SQLite.
Thanks adamchainz for the report and review.
This commit is contained in:
committed by
Tim Graham
parent
2c4c67af94
commit
d3c87a2425
@@ -127,7 +127,7 @@ def typecast_time(s): # does NOT store time zone information
|
||||
seconds, microseconds = seconds.split('.')
|
||||
else:
|
||||
microseconds = '0'
|
||||
return datetime.time(int(hour), int(minutes), int(seconds), int(float('.' + microseconds) * 1000000))
|
||||
return datetime.time(int(hour), int(minutes), int(seconds), int((microseconds + '000000')[:6]))
|
||||
|
||||
|
||||
def typecast_timestamp(s): # does NOT store time zone information
|
||||
|
||||
Reference in New Issue
Block a user