diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-10-28 07:46:36 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-10-28 07:46:36 -0400 |
commit | feefadb125770c0a513735ba7b3d6bea78c77d3b (patch) | |
tree | dce12d9edc21578605da76e2707031fc3fff6ff3 /js/lib | |
parent | 3c1cd53a399b32ee5bae7f095b3686fa62310ef1 (diff) | |
download | elgg-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/lib')
-rw-r--r-- | js/lib/ui.js | 4 |
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'); |