Skip to content

Commit

Permalink
Use 'Z' for tz name when offset if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Zverev committed Jan 10, 2019
1 parent 0251af1 commit 42edb05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpxpy/gpxfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def dst(self, dt):
return mod_datetime.timedelta(0)

def tzname(self, dt):
if self.offset == 0:
return 'Z'
return '{:02}:{:02}'.format(self.offset // 60, self.offset % 60)

def __repr__(self):
Expand Down

0 comments on commit 42edb05

Please sign in to comment.