Project

Profile

Help

Bug #3596

closed

current-date and current-dateTime does not give the instant date/time stamp

Added by O'Neil Delpratt over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2018-01-03
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

The current-date and current-dateTime does not give the instant date/time stamp when called during an 'interactive' XSLT event. This is noticeable if the browser is not refreshed overnight.

As a workaround I guess I could force a call to the transform function or call out to JavaScript.

It would be desirable to have implemented in Saxon-JS the extension function saxon:timestamp.

Actions #2

Updated by Michael Kay over 6 years ago

I think it would probably make sense for current-dateTime() to be updated whenever an ixsl:schedule-action occurs or when an event-driven template rule is activated. If we went this way we would have to make sure that the optimizer is aware that current-dateTime() and friends are no longer pure functions, and mustn't be promoted to global variables. If that proves problematic, then using saxon:timestamp() for the purpose might be an alternative way forward.

Note also that implicit-timezone() can also potentially change while a stylesheet is waiting for the next user event.

Actions #3

Updated by Debbie Lockett about 6 years ago

Function saxon:timestamp() implemented (1.0 and trunk branches).

Actions #4

Updated by Debbie Lockett about 6 years ago

JS unit test saxonExt/timestamp01 added (note saxon:timestamp() available from 9.8).

To do: add information to documentation.

Actions #5

Updated by Debbie Lockett about 6 years ago

  • Status changed from New to Resolved
  • Fix Committed on JS Branch 1.0, Trunk added

Documentation updated: added subsection about available Saxon extensions in Conformance section (conformance/saxon-extensions).

Actions #6

Updated by Debbie Lockett almost 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.1.0

Bug fix applied in the Saxon-JS 1.1.0 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page