← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~nigelbabu/launchpad/188187-time-zone-offset into lp:launchpad

 

Nigel Babu has proposed merging lp:~nigelbabu/launchpad/188187-time-zone-offset into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~nigelbabu/launchpad/188187-time-zone-offset/+merge/73168


-- 
https://code.launchpad.net/~nigelbabu/launchpad/188187-time-zone-offset/+merge/73168
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~nigelbabu/launchpad/188187-time-zone-offset into lp:launchpad.
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2011-06-10 10:50:45 +0000
+++ lib/lp/registry/browser/person.py	2011-08-28 09:24:34 +0000
@@ -3201,7 +3201,14 @@
                 return True
 
         return False
-
+ 
+    @property
+    def show_time_offset(self):
+        """
+        Return the time-zone and offset from UTC
+        """
+        offset = datetime.now(pytz.timezone('Asia/Kolkata')).strftime("%z")
+        return offset
 
 class PersonParticipationView(LaunchpadView):
     """View for the ~person/+participation page."""

=== modified file 'lib/lp/registry/templates/person-portlet-contact-details.pt'
--- lib/lp/registry/templates/person-portlet-contact-details.pt	2011-06-02 17:15:39 +0000
+++ lib/lp/registry/templates/person-portlet-contact-details.pt	2011-08-28 09:24:34 +0000
@@ -173,7 +173,9 @@
       <dt>Time zone:
         <a tal:replace="structure overview_menu/editlocation/fmt:icon" />
       </dt>
-      <dd tal:content="context/time_zone">UTC</dd>
+      <dd><tal:offset content="context/time_zone">UTC</tal:offset>
+      (UTC<tal:offset content="view/show_time_offset">+0000</tal:offset>)
+      </dd>
     </dl>
 
     <dl id="karma">


Follow ups