The following comment has been added to this issue:
Author: Arnaud HERITIER
Created: Tue, 26 Oct 2004 5:42 PM
Body:
I'm not sure about this.
I never noticed a problem (except that this does not respect daylight savings).
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPXDOC-121?page=comments#action_25804
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPXDOC-121
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPXDOC-121
Summary: Calculation of local time of team member is wrong
Type: Bug
Status: Open
Priority: Minor
Original Estimate: 15 minutes
Time Spent: Unknown
Remaining: 15 minutes
Project: maven-xdoc-plugin
Assignee: Arnaud HERITIER
Reporter: Ortwin Gl�ck
Created: Fri, 1 Oct 2004 5:31 AM
Updated: Tue, 26 Oct 2004 5:42 PM
Environment: N/A
Description:
In the POM the Timezone of the developer is defined as an offset to GMT. (This is
actually poor, as this does not respect daylight savings. Timezone names should have
been preferred.)
Now, there is JavaScript Code in src/plugin-resources/templates/team-list.xml that
calculates the local time of a team member based on that value from the POM and the
local time of the user viewing the page.
Code fragement:
----
function offsetDate(id, offset) {
var now = new Date() ;
var nowTime = now.getTime() ;
var localOffset = now.getTimezoneOffset() ;
var developerTime = nowTime + (offset * 60 * 60 * 1000) + (localOffset * 60 *
1000) ;
var developerDate = new Date(developerTime) ;
document.getElementById(id).innerHTML = developerDate;
}
----
The code in question is:
----
var developerTime = nowTime + (offset * 60 * 60 * 1000) + (localOffset * 60 * 1000) ;
----
This reads:
[developerTime] = [local time] + [local timezone offset] + [developer timezone offset]
which does not make any sense.
It should rather be:
[developerTime] = [local time] - [local timezone offset] + [developer timezone offset]
so the above line should be:
----
var developerTime = nowTime + (offset * 60 * 60 * 1000) - (localOffset * 60 * 1000) ;
----
Kind regards
Ortwin Gl�ck
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]