summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-03-04 09:34:46 -0600
committerRob Crittenden <rcritten@redhat.com>2011-03-04 11:14:50 -0500
commit24ba58bc6115bdbcdf7fa89dc5f683b2014cc992 (patch)
tree00986a60ccd39323dff65feed2f1f84c2a34b7aa
parent4d0e739345fe3039db16e0ee613431e1aa92cf02 (diff)
downloadfreeipa-24ba58bc6115bdbcdf7fa89dc5f683b2014cc992.zip
freeipa-24ba58bc6115bdbcdf7fa89dc5f683b2014cc992.tar.gz
freeipa-24ba58bc6115bdbcdf7fa89dc5f683b2014cc992.tar.xz
Fixed host enrollment time
The month in krblastpwdchange (LDAP Generalized Time) is 1-based but the month in JavaScript Date.setUTCFullYear() is 0-based so it needs a conversion. Ticket 1053
-rw-r--r--install/ui/host.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/install/ui/host.js b/install/ui/host.js
index 9ef7553..7d9e8f0 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -126,13 +126,13 @@ IPA.utc_date_column_format = function(value){
var date = new Date();
date.setUTCFullYear(
- value.substring(0, 4),
- value.substring(4, 6),
- value.substring(6, 8));
+ value.substring(0, 4), // YYYY
+ value.substring(4, 6)-1, // MM (0-11)
+ value.substring(6, 8)); // DD (1-31)
date.setUTCHours(
- value.substring(8, 10),
- value.substring(10, 12),
- value.substring(12, 14));
+ value.substring(8, 10), // HH (0-23)
+ value.substring(10, 12), // MM (0-59)
+ value.substring(12, 14)); // SS (0-59)
var formated = date.toString();
return formated;
};