#2569 Revert "timezones for py 2.7"
Merged 2 years ago by tkopecek. Opened 2 years ago by tkopecek.
tkopecek/koji issue2568  into  master

file modified
+4
@@ -3307,6 +3307,10 @@ 

          t = datetime.datetime.fromtimestamp(value)

      else:

          t = value

+     # return date in local timezone, py 2.6 has tzone as astimezone required parameter

+     # would work simply as t.astimezone() for py 2.7+

+     if t.tzinfo is None:

+         t = t.replace(tzinfo=dateutil.tz.gettz())

      t = t.astimezone(dateutil.tz.gettz())

      return datetime.datetime.strftime(t, '%a, %d %b %Y %H:%M:%S %Z')

  

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

Commit d0a4063 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago