I may have missed the context for this?
Do you want the last build date to show the correct timestamp regardless of
time zone?

This _should_ work with maven.xdoc.date.format=dd MMM yyyy HH:mm:ss z
(The js works as in the examples below, I didn't test/modify my jsl though)

Such as..

 <j:if test="${date == 'navigation-bottom'}">
   <div id="lastPublished">Last published:
+     <script lang="javscript">
+       document.write(new Date(Date.parse(${build.date})).toLocaleString())
+     </script>
   </div>
 </j:if>



+--------------------------+
Examples to drop in browser:
+--------------------------+
gmtTimeMs = 1084577575203;
alert((new Date(gmtTimeMs).toLocaleString()));

gmtTimeMs = Date.parse("14 May 2004 19:32:55 EST")
alert((new Date(gmtTimeMs).toLocaleString()));

gmtTimeMs = Date.parse("14 May 2004 19:32:55 EDT")
alert((new Date(gmtTimeMs).toLocaleString()));
+--------------------------+

Hope it helps (sorry if I missed the point)
-TR


> -----Original Message-----
> From: Webb Morris [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 3:07 PM
> To: Maven Users List
> Subject: Re: timezone working?
>
>
> Sorry, I forgot about it after a while.  I did take a look at the
> code for generating the time.
> Basically, since the code is JavaScript running in the browser,
> it takes the current system time
> according to the browser, adjusts it to GMT, and then adds the
> offset hours.  I tried to figure
> out how to fix the problem of "knowing" about a particular time
> zone being in Daylight Saving
> mode, but I believe that is impossible with JavaScript tools.
>
> Since the offset is really just that, an offset value, and that
> value is variable throughout the
> year (at least in the US), then your only option is to change the
> value the same time that you
> change the clocks, or deal with the difference.  Perhaps you
> could write a plugin that would
> dynamically determine your offset at generation time.  All it
> would need to do is determine if you
> were currently in Daylight Saving mode and then adjust the offset
> accordingly.  Of course, this
> means that you would have to make sure to rebuild your project
> site at the same time that the
> clock changes, so that probably isn't of much use.
>
> Maybe someone else has some better insight into the problem.
>
> WM
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to