You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "stevedlawrence (GitHub)" <gi...@apache.org> on 2018/08/27 15:43:44 UTC
[GitHub] [incubator-daffodil] stevedlawrence opened pull request
#116: Fix comparison of calendars that do not have timezones
The assertions was just incorrect. It is perfectly valid to call the
orderIgnoreTimeZone function where one calendar has a timezone and the
other does not, as long as they have been normalized/modified according
to the W3C spec before being called. Remove this invarient, and add a
couple extra just to make sure we are modifying calendar appropriately.
And move test out of scala debug.
DAFFODIL-1986
[ Full content available at: https://github.com/apache/incubator-daffodil/pull/116 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-daffodil] stevedlawrence commented on pull
request #116: Fix comparison of calendars that do not have timezones
Posted by "stevedlawrence (GitHub)" <gi...@apache.org>.
When doing the comparison of two dateTimes, the only fields that are inspected are year, month, day, hour, minute, and second. So in that sense the timezone is ignored. Technically, it is not completely ignored though, since the dateTime is normalized to UTC, so a dateTime with a non-UTC TZ will have its hours/minutes modified, which are compared.
So this function name ism't completely innacurate. That said, something like orderCompareFields might be more specific about what it's actually doing, since all it's really doing is looping over a subset of the fields of a calendar and comparing them. I'll update the name and comment to be accurate according to what the method does.
[ Full content available at: https://github.com/apache/incubator-daffodil/pull/116 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-daffodil] stevedlawrence closed pull request
#116: Fix comparison of calendars that do not have timezones
Posted by "stevedlawrence (GitHub)" <gi...@apache.org>.
[ pull request closed by stevedlawrence ]
[ Full content available at: https://github.com/apache/incubator-daffodil/pull/116 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-daffodil] mbeckerle commented on pull request
#116: Fix comparison of calendars that do not have timezones
Posted by "mbeckerle (GitHub)" <gi...@apache.org>.
The scaladoc here is not consistent with what this method does anymore. It describes a contract that P and Q must match as to whether they have, or do not have timezone.
In what sense does this "ignore timezone" anyway? Seems to me it treats TZ like any other field, with the exception of the two assert.invariant calls. Is this method's name actually indicative of it's behavior?
[ Full content available at: https://github.com/apache/incubator-daffodil/pull/116 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org