Skip to content

Commit

Permalink
Removed unused 'tz' variable in typecast_timestamp().
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivasreddy authored and timgraham committed Nov 9, 2018
1 parent a7ef4a5 commit 978ad6d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions django/db/backends/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,11 @@ def typecast_timestamp(s): # does NOT store time zone information
if ' ' not in s:
return typecast_date(s)
d, t = s.split()
# Extract timezone information, if it exists. Currently it's ignored.
# Remove timezone information.
if '-' in t:
t, tz = t.split('-', 1)
tz = '-' + tz
t, _ = t.split('-', 1)
elif '+' in t:
t, tz = t.split('+', 1)
tz = '+' + tz
else:
tz = ''
t, _ = t.split('+', 1)
dates = d.split('-')
times = t.split(':')
seconds = times[2]
Expand Down

0 comments on commit 978ad6d

Please sign in to comment.