How to print Timezone GMT+1 or GMT+2 when time sum

2019-08-17 08:04发布

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.

标签: xslt xslt-1.0
1条回答
贼婆χ
2楼-- · 2019-08-17 09:02

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.

查看更多
登录 后发表回答