aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-10-28 07:46:36 -0400
committerCash Costello <cash.costello@gmail.com>2011-10-28 07:46:36 -0400
commitfeefadb125770c0a513735ba7b3d6bea78c77d3b (patch)
treedce12d9edc21578605da76e2707031fc3fff6ff3 /js
parent3c1cd53a399b32ee5bae7f095b3686fa62310ef1 (diff)
downloadelgg-feefadb125770c0a513735ba7b3d6bea78c77d3b.tar.gz
elgg-feefadb125770c0a513735ba7b3d6bea78c77d3b.tar.bz2
Fixes #4012 when using a timestamp with input/date, return UTC time rather than local time
Diffstat (limited to 'js')
-rw-r--r--js/lib/ui.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 166ca16bc..6cc1bc78a 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -267,8 +267,8 @@ elgg.ui.initDatePicker = function() {
onSelect: function(dateText) {
if ($(this).is('.elgg-input-timestamp')) {
// convert to unix timestamp
- var date = $.datepicker.parseDate('yy-mm-dd', dateText);
- var timestamp = $.datepicker.formatDate('@', date);
+ var dateParts = dateText.split("-");
+ var timestamp = Date.UTC(dateParts[0], dateParts[1] - 1, dateParts[2]);
timestamp = timestamp / 1000;
var id = $(this).attr('id');