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

Reply via email to