Hi Eliot, That is not covered by the XPath standard, from the looks of it: https://www.w3.org/TR/xslt20/#date-picture-string
I¹m afraid you will have to glue the timezone name to the date yourself. Consider doing a reverse lookup in this map:map: https://github.com/grtjn/ml-datetime/blob/master/datetime.xqy#L536, though I imagine that could result in ambiguity. There are a few different timezones with same offset if I am not mistaken. That is probably also why they chose to leave it out of the standard.. Cheers On 9/29/17, 5:45 PM, "[email protected] on behalf of Eliot Kimber" <[email protected] on behalf of [email protected]> wrote: >I¹m trying to produce a formatted date that reflects a specific time zone >name, rather than e.g., ³GMT-07:00² > >format-dateTime($time, "[Y0001]-[M01]-[D01] at [H01]:[m01]:[s01] [ZN]") > >where $time = 2017-09-29T08:01:54.216992-07:00 > >Returns > >2017-09-29 at 08:01:54 GMT-07:00 > >Running on server in pacific time zone. > >What I¹d like is > >2017-09-29 at 08:01:54 PDT > >I¹ve tried setting the $place parameter to different values but nothing >I¹ve tried gives me a different result except to add a prefix before the >date indicating the location. I also tried different values for the time >zone pattern with no change (or simple failure due to a bad pattern). The >W3C docs suggest that ³[ZN]² should result in just the time zone name but >those specs are very difficult to understand so I¹m never sure I¹m >understanding them correctly. > >Thanks, > >Eliot >-- >Eliot Kimber >http://contrext.com > > > > >_______________________________________________ >General mailing list >[email protected] >Manage your subscription at: >http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
