changeset 672:6160b7be468a

Ext sends timezone information to the server to prevent accidental changes in times
author Dustin Demuth <dustin@intevation.de>
date Mon, 23 Mar 2015 13:15:10 +0100
parents 08e3e7b80a34
children 0d5fb0f585f1
files resources/lib/translations_de.js
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/resources/lib/translations_de.js	Fri Mar 20 11:25:48 2015 +0100
+++ b/resources/lib/translations_de.js	Mon Mar 23 13:15:10 2015 +0100
@@ -20,8 +20,19 @@
         Ext.grid.RowEditor.prototype.dirtyText = "Sie müssen Ihre Änderungen Speichern oder durch Abbrechen verwerfen";
     }
 
+// Ext has to send timezone-information when saving date-objects
+// If not: Datetime-information will be falsified when a date-object is saved
+// i.e
+// originaltime 8:00 (save) -> time+offset 9:00 (save) -> 10:00 -> etc...
+Ext.JSON.encodeDate = function(o)
+{
+    return '"' + Ext.Date.format(o, 'c') + '"';
+}
+
+
 });
 
+
 //Übersetzungsfehler
 Ext.define("Ext.locale.de.toolbar.Paging", {
     override: "Ext.PagingToolbar",

http://lada.wald.intevation.org