[csw-devel] SF.net SVN: gar:[14794] csw/mgar/gar/v2/lib/web/pkgdb_web.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Jun 12 22:37:30 CEST 2011


Revision: 14794
          http://gar.svn.sourceforge.net/gar/?rev=14794&view=rev
Author:   wahwah
Date:     2011-06-12 20:37:30 +0000 (Sun, 12 Jun 2011)

Log Message:
-----------
pkgdb-web: Adjusting the time offset

This would be best handled by proper time zone handling. Hardcoding for now.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/pkgdb_web.py

Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py	2011-06-12 20:31:32 UTC (rev 14793)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py	2011-06-12 20:37:30 UTC (rev 14794)
@@ -58,7 +58,7 @@
     def Ago(timedelta):
       # Not sure why there is a time difference between mysql and the datetime
       # module.
-      timezone_diff = 1.0
+      timezone_diff = 2.0
       return "%.1fh" % (timedelta.seconds / 60.0 / 60.0 - timezone_diff)
     pkgs_ago = [(x, Ago(now - x.mtime)) for x in pkgs]
     return render.Srv4List(pkgs_ago)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list