Public bug reported:

the timezone formatting in http://www.w3.org/TR/xpath-functions-30
/#func-format-dateTime does not work.

example:

  format-dateTime(current-dateTime(),
"[D01][M01][Y0001][H01][m01][s01][z]")

expected:

  08052012152215GMT+02:00

actual result:

  08052012152215

The timezone is just not returned. A temporary workaround in XQuery is
(for others running into this issue):

  concat(
    format-dateTime(
      adjust-dateTime-to-timezone(current-dateTime(),   
                                  xs:dayTimeDuration("PT2H")),
      "[D01][M01][Y0001][H01][m01][s01]"),
    "GMT+02:00")

** Affects: zorba
     Importance: Medium
     Assignee: Markos Zaharioudakis (markos-za)
         Status: New


** Tags: incorrect-result

** Description changed:

  the timezone formatting in http://www.w3.org/TR/xpath-functions-30
  /#func-format-dateTime does not work.
  
  example:
  
-   format-dateTime(current-dateTime(),
+   format-dateTime(current-dateTime(),
  "[D01][M01][Y0001][H01][m01][s01][z]")
  
  expected:
  
-   08052012152215GMT+02:00
+   08052012152215GMT+02:00
  
  actual result:
  
-   08052012152215
+   08052012152215
  
  The timezone is just not returned. A temporary workaround in XQuery is
  (for others running into this issue):
  
-   concat(
-     format-dateTime(
-       adjust-dateTime-to-timezone(current-dateTime(), 
xs:dayTimeDuration("PT2H")),
-       "[D01][M01][Y0001][H01][m01][s01]"),
-     "GMT+02:00")
+   concat(
+     format-dateTime(
+       adjust-dateTime-to-timezone(current-dateTime(),   
+                                   xs:dayTimeDuration("PT2H")),
+       "[D01][M01][Y0001][H01][m01][s01]"),
+     "GMT+02:00")

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/996548

Title:
  format-dateTime does not support timezone

Status in Zorba - The XQuery Processor:
  New

Bug description:
  the timezone formatting in http://www.w3.org/TR/xpath-functions-30
  /#func-format-dateTime does not work.

  example:

    format-dateTime(current-dateTime(),
  "[D01][M01][Y0001][H01][m01][s01][z]")

  expected:

    08052012152215GMT+02:00

  actual result:

    08052012152215

  The timezone is just not returned. A temporary workaround in XQuery is
  (for others running into this issue):

    concat(
      format-dateTime(
        adjust-dateTime-to-timezone(current-dateTime(),   
                                    xs:dayTimeDuration("PT2H")),
        "[D01][M01][Y0001][H01][m01][s01]"),
      "GMT+02:00")

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/996548/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to