How to print Timezone GMT+1 or GMT+2 when time summer is activated in XSLT 1.0

旧巷老猫 提交于 2019-12-11 23:19:32

问题


I want to see if there's any possibillty to change Time Zone from GMT+1 to GMT+2 when daylight save activated and started in PDF file genreted from XSLT file now the value of time zone is hardcoded :

<xsl:value-of select="payment/@date-produce" />
(GMT+1)

so please can you help me to automatize this thanks.


回答1:


There's no standard function in XSLT 1.0 that will help with this, and the EXSLT date/time library won't help either. You'll need to write your own extension.

In XSLT 2.0/3.0 the format-dateTime() function, if given a timezone such as "America/New_York" as the 5th argument, will adjust and display the value according to the local time in that place, including daylight savings time.



来源:https://stackoverflow.com/questions/51063644/how-to-print-timezone-gmt1-or-gmt2-when-time-summer-is-activated-in-xslt-1-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!