mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 12:58:46 +01:00
* Etemplate - timestamper widget now supports timezone attribute to force a certain timezone
This commit is contained in:
parent
7ed5c42b3d
commit
dca3c1ec30
@ -36,6 +36,12 @@ var et2_timestamper = (function(){ "use strict"; return et2_button.extend([],
|
|||||||
default: et2_no_init,
|
default: et2_no_init,
|
||||||
description: "Format for the timestamp. User is always after."
|
description: "Format for the timestamp. User is always after."
|
||||||
},
|
},
|
||||||
|
timezone: {
|
||||||
|
name: "Timezone",
|
||||||
|
type: "string",
|
||||||
|
default: et2_no_init,
|
||||||
|
description: "Timezone. Default is user time."
|
||||||
|
},
|
||||||
image: {
|
image: {
|
||||||
default: "timestamp"
|
default: "timestamp"
|
||||||
},
|
},
|
||||||
@ -70,7 +76,9 @@ var et2_timestamper = (function(){ "use strict"; return et2_button.extend([],
|
|||||||
|
|
||||||
_insert_text: function() {
|
_insert_text: function() {
|
||||||
var text = "";
|
var text = "";
|
||||||
var now = new Date();
|
var now = new Date(new Date().toLocaleString('en-US', {
|
||||||
|
timeZone: this.options.timezone ? this.options.timezone : egw.preference('tz')
|
||||||
|
}));
|
||||||
var format = (this.options.format ?
|
var format = (this.options.format ?
|
||||||
this.options.format :
|
this.options.format :
|
||||||
egw.preference('dateformat') + ' ' + (egw.preference("timeformat") === "12" ? "h:ia" : "H:i"))+' ';
|
egw.preference('dateformat') + ' ' + (egw.preference("timeformat") === "12" ? "h:ia" : "H:i"))+' ';
|
||||||
|
Loading…
Reference in New Issue
Block a user