From 4200a6db24396f7c01bd97930f910cc7453fad36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 28 Sep 2012 11:35:05 +0200
Subject: [PATCH] Display creation date, modification date and workflow history
 in user's preferred timezone

---
 .../listbox_creation_date.xml                 | 32 ++++++++++++++++
 .../listbox_modification_date.xml             | 32 ++++++++++++++++
 .../Base_viewWorkflowHistory/listbox_time.xml | 38 ++++++++++++++++++-
 3 files changed, 101 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_creation_date.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_creation_date.xml
index 8de1572c4d..6edb5f70b4 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_creation_date.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_creation_date.xml
@@ -11,6 +11,7 @@
             <value>
               <list>
                 <string>date_only</string>
+                <string>default_timezone</string>
                 <string>editable</string>
               </list>
             </value>
@@ -53,6 +54,20 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>date_only</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -76,6 +91,10 @@
                     <key> <string>date_only</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>editable</string> </key>
                     <value> <int>0</int> </value>
@@ -98,4 +117,17 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>preferences/getPreferredTimeZone</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_modification_date.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_modification_date.xml
index 34ed6df47a..9b96f82d25 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_modification_date.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary/listbox_modification_date.xml
@@ -11,6 +11,7 @@
             <value>
               <list>
                 <string>date_only</string>
+                <string>default_timezone</string>
                 <string>editable</string>
               </list>
             </value>
@@ -53,6 +54,20 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>date_only</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -76,6 +91,10 @@
                     <key> <string>date_only</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>editable</string> </key>
                     <value> <int>0</int> </value>
@@ -98,4 +117,17 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>preferences/getPreferredTimeZone</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory/listbox_time.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory/listbox_time.xml
index 9713797c09..436d373ee1 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory/listbox_time.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory/listbox_time.xml
@@ -10,9 +10,10 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>title</string>
                 <string>date_only</string>
+                <string>default_timezone</string>
                 <string>editable</string>
+                <string>title</string>
               </list>
             </value>
         </item>
@@ -54,6 +55,20 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>date_only</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -66,6 +81,10 @@
                     <key> <string>target</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
               </dictionary>
             </value>
         </item>
@@ -77,6 +96,10 @@
                     <key> <string>date_only</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>default_timezone</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>editable</string> </key>
                     <value> <int>0</int> </value>
@@ -103,4 +126,17 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>preferences/getPreferredTimeZone</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
-- 
2.30.9