Graham, thank you for the help.

We are also using XMLUI, but I could not understand that piece of code, Im
relatively new to web aplications and am not familiar with the languages,
Im more familiar with java.

I saw in the discussion, you sent the link, that XMLUI stores the dates in
UTC time and just changes it when displaying.

Do you know, how does it store that value?

Because, if I can add an offset to that, I can make the program think my
timezone is actually the UTC time zone, and all the other places that are
dependant of it would also work with the timezone I need.

2015-07-02 10:27 GMT-03:00 Graham Faulkner <[email protected]>:

>  Hi Arthur,
>
>
>
> We have been looking at this issue too, so perhaps I can shed some light.
>
>
>
> Here is an old discussion about how to change the displayed dates in
> JSPUI: http://sourceforge.net/p/dspace/mailman/message/29889171/.
>
>
>
> However, we are using XMLUI (Mirage2) in DSpace 5.1, so I experimented
> with a custom
> /home/dspace/dspace-source/dspace/modules/xmlui-mirage2/src/main/webapp/themes/Mirage2/xsl/aspect/artifactbrowser/item-view.xsl.
>
>
>
>
> Then I added the following namespace info to the <xsl:stylesheet> tag:
>
>
>
> xmlns:date="http://exslt.org/dates-and-times";
>
> extension-element-prefixes="date"
>
>
>
> Note: because the XSLT is version 1.0 I could not benefit from XPath 2.0
> functions such as adjust-dateTime-to-timezone().
>
>
>
> Then I updated the <xsl:template match="dim:field"
> mode="itemDetailView-DIM"> template where it was displaying the date.  I
> wanted to modify the displayed date for dc.date.accessioned and
> dc.date.available, so I performed the following test and used
> date:date-time() to calculate the correct local timezone and displayed it
> along with a formatted version of the UTC date-time stored in the node().
>
>
>
>    <td class=”word-break”>
>
> <xsl:choose>
>
>                          <xsl:when test="not(@element='date' and
> @qualifier='accessioned') and not(@element='date' and
> @qualifier='available')">
>
>                              <xsl:value-of select="./node()"/>
>
>                          </xsl:when>
>
>                          <xsl:otherwise>
>
>                              <xsl:variable name="dt" select="./node()" />
>
>                              <!-- cannot use
> fn:adjust-dateTime-to-timezone because requires XSLT 2.0 -->
>
>                              <!--<xsl:value-of
> select="fn:adjust-dateTime-to-timezone($dt, '-PT4H')" />-->
>
>                              <xsl:variable name="currDateTime"
> select="date:date-time()" />
>
>                              <xsl:variable name="currTimeZone"
> select="substring($currDateTime,20,25)" />
>
>                              <xsl:value-of select="date:format-date($dt,
> 'YYYY-MM-dd HH:mm:ss')" />
>
>                              <xsl:value-of select="$currTimeZone" />
>
>                          </xsl:otherwise>
>
>              </xsl:choose>
>
>   </td>
>
>
>
> What I still need to do is perform an actual transformation to the current
> timezone for the UTC date-time stored in the node(), but at least I am
> further along in where and how to make the changes.
>
>
>
> Hope that helps.
>
>
>
> Graham
>
>
>
>
>
> *From:* Arthur Sady Cordeiro Rossetti [mailto:[email protected]]
> *Sent:* Wednesday, July 01, 2015 9:25 AM
> *To:* [email protected]
> *Subject:* [Dspace-tech] dc.date.accessioned incorrect setting
>
>
>
> Hi, Im trying to find the file where Dspace automatically sets the
> dc.date.accessed variable date which represents the date of submission of
> the items in de database, because in my instance, even though the machine
> where its running has the right time configuration and in the right
> timezone, the value in dc.date.accessed is always set based in the UTC
> timezone, I changed the computer clock, to compensate and it solved the
> problem, but this solution is not enough for me because there are other
> aplications dependant on the computer clock.
>
> So does anybody knows where I can find the file where that variable is
> set, so I can change it?
>
>   Thanks for the attention
>
> --
>
> Arthur Sady C. Rossetti
>
>
>
>
>
>
>



-- 
Arthur Sady C. Rossetti
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to