Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorVinzenz <vinzenz.rosenkranz@gmail.com>2017-02-26 17:14:06 +0300
committerVinzenz <vinzenz.rosenkranz@gmail.com>2017-02-26 17:14:06 +0300
commit86c0ec1963ee5e3b9e54521908694b1ccca165f8 (patch)
tree978696210e039c0527155ac3f9cdb189a193dbe3 /js
parentf86c657815ea202de1c8bf38c9c6bfaa3a8c9c24 (diff)
don't add timezone to datepicker
Diffstat (limited to 'js')
-rw-r--r--js/create_edit.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/js/create_edit.js b/js/create_edit.js
index 3d8a713f..97e72cb0 100644
--- a/js/create_edit.js
+++ b/js/create_edit.js
@@ -354,15 +354,8 @@ $(document).ready(function () {
alert(t('polls', 'Nothing selected!\nClick on cells to turn them green.'));
return false;
}
- if(chosen_type == 'event') {
- var tzOffset = new Date().getTimezoneOffset() * 60; //from min to ms
- for(var i=0; i<g_chosen_datetimes.length; i++) {
- g_chosen_datetimes[i] -= tzOffset; // -, because offset is negative for > UTC
- }
- form.elements['chosenDates'].value = JSON.stringify(g_chosen_datetimes);
- } else {
- form.elements['chosenDates'].value = JSON.stringify(g_chosen_texts);
- }
+ if(chosen_type == 'event') form.elements['chosenDates'].value = JSON.stringify(g_chosen_datetimes);
+ else form.elements['chosenDates'].value = JSON.stringify(g_chosen_texts);
var title = document.getElementById('pollTitle');
if (title == null || title.value.length == 0) {
alert(t('polls', 'You must enter at least a title for the new poll.'));