Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 0096 date time #288

Merged
merged 3 commits into from Apr 13, 2017
Merged

Issue 0096 date time #288

merged 3 commits into from Apr 13, 2017

Conversation

skynavga
Copy link
Collaborator

Add wallclock-time form for time-expression syntax, allowing explicit dates; however, do not support explicit time zone offsets since ttp:clockMode already implicitly selects time zone that applies to time expressions.

Add #time-wall-clock feature designator.

See #96.

@skynavga skynavga merged commit 0969118 into gh-pages Apr 13, 2017
Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am requesting some changes before this is merged. Since it has already been merged, I am requesting that it be unmerged, requested changes to be applied and the updated branch with the changes to be merged when consensus has been achieved.
The early merge here was unhelpful and unnecessary in my view.

: date "T" wall-time

wall-time
: ( hhmm-time | hhmmss-time )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a (TZD)? component.

@@ -16886,6 +16908,8 @@ when the <code>clock</code> time base applies.</p>
<p>If a &lt;time-expression&gt; is expressed in terms of an
<emph>offset-time</emph> and no <emph>metric</emph> is specified, then it is to be treated as
if a metric of <code>s</code> (seconds) were specified.</p>
<p>It is considered an error if the <emph>wallclock-time</emph> form of a &lt;time-expression&gt;
is used in a <loc href="#terms-document-instance">document instance</loc> and the government time base is not <code>clock</code>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/government/governing

?

@@ -22464,29 +22512,30 @@ as follows:
</sitem>
<sitem/>
<sitem>
(1) if <code>local</code>, then the difference between the local real time at the most immediately prior local midnight and the local real time
(1) if <code>local</code>, then the difference between the local real time at the most immediate prior local midnight and the local real time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB it is not possible to infer anything from this which definition of 'local' applies - this does not need changing in my view but does point to why the (TZD)? component needs to be available in wallclock time expressions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definitions of epoch when local applies and C seem to conflict. It seems to me that the date part of a wallclock time defines the epoch and the applicable midnight to use and the C is just an interpretation of the time part of the expression relative to that epoch.

@skynavga
Copy link
Collaborator Author

skynavga commented Apr 13, 2017 via email

@aphillips
Copy link

I have some heartburn here. What happens with ttp:clockMode when its value is local? A local time offset (LTO) is not a good definition of a time zone and the syntax here doesn't permit the expression of the LTO in any case. Are local time zone rules expected to apply to the date and time values? If not, how do "local" times work?

For reference, see https://www.w3.org/TR/timezone/

@skynavga
Copy link
Collaborator Author

skynavga commented Apr 13, 2017 via email

@nigelmegitt
Copy link
Contributor

In the case of 'local' clock mode, it effectively means
whatever time zone applies to the document processing context (not the
authoring context)

As stated on the pull request review comments I would like to reintroduce the optional (TZD)? component so that it can be defined in the authoring context, which seems like a reasonable thing to want to do. Also note that one use case for this is when the generated document is an archive of what was actually created, rather than a document intended for later presentation. In the case of live subtitles this is an important use case, and it is reasonable to record the time zone in this use case.

Adding a timezone component in this case would only be
confusing and cumbersome.

I don't agree.

The only question that remains in my mind is whether we should allow the
optional use of a 'Z' timezone component when clock mode is 'utc'.

That would be of no benefit that I can determine.

@skynavga
Copy link
Collaborator Author

skynavga commented Apr 13, 2017 via email

@nigelmegitt
Copy link
Contributor

it has not been articulated previously (AFAICT)

In fact it was articulated back in October 2014: https://www.w3.org/2014/10/27-tt-minutes.html and in general the use case was mentioned in https://www.w3.org/wiki/TTML/changeProposal025

Certainly there has never been any text in the spec that constrains the times to be in the future, and I have always read it that the times may either be historical or future-based, especially when ttp:timeBase="clock". So it is not at all a significant departure but a natural consequence of the language already present (and absent) from the specification.

Further, there is implementation work that creates TTML documents based on historical events already, using exactly this approach.

@skynavga
Copy link
Collaborator Author

skynavga commented Apr 13, 2017 via email

@nigelmegitt
Copy link
Contributor

At first glance, supporting this
mode would require introducing a new clockMode value, say 'archive', which,
if used, would permit the use of timezone information.

I would say no such change is needed - if anything the fact that the times are archive times is a matter of metadata rather than the times themselves. I have not found anything other than time zone that cannot be done with the spec as it is when creating archived recordings of live subtitles, so I would do as little as possible here.

@skynavga
Copy link
Collaborator Author

skynavga commented Apr 13, 2017 via email

@aphillips
Copy link

@skynavga All time values need to become incremental times measured on the system's epoch-based timekeeping system (monotonic time measured using integers) for processing purposes. Otherwise you can't really do anything. Time zones (or LTO if that's all you have) can be used as part of the process of converting the time fields into the incremental representation.

A wall clock time 2017-04-13T10:24 with a time zone of America/Los_Angeles has a fully specified relationship to incremental time. So does 2017-04-13T17:24Z. Or 2017-04-13T10:24-0700. A wall clock time that relies on local can work if and only if local is defined to include time zone rules and noting that some time values (during daylight savings/summer time changes) are ambiguous unless they include at least LTO.

Does that make sense?

@skynavga skynavga deleted the issue-0096-date-time branch August 21, 2017 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants