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

"00:00" parsed to public_departure_time parsed from CIF instead of NULL #19

Closed
mk-fg opened this issue Sep 2, 2017 · 0 comments
Closed

Comments

@mk-fg
Copy link
Contributor

mk-fg commented Sep 2, 2017

Seem to be an issue with fix for #16, as reverting 1ee1a61 fixes that.

Looks like this in CIF database:

  N26072  250761 N 2017-11-13 2017-11-13 1...... A YRK --:-- 00:35 TB
  N26072  250761 N 2017-11-13 2017-11-13 1...... A THI --:-- 00:00
  N26072  250761 N 2017-11-13 2017-11-13 1...... A NTR 01:06 00:00 D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A DAR 01:20 00:00 D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A DHM 01:38 00:00 D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A NCL 02:08 --:-- TF

(where "--:--" are NULL values)

Instead of this (with 1ee1a61 reverted):

  N26072  250761 N 2017-11-13 2017-11-13 1...... A YRK --:-- 00:35 TB
  N26072  250761 N 2017-11-13 2017-11-13 1...... A THI --:-- --:--
  N26072  250761 N 2017-11-13 2017-11-13 1...... A NTR 01:06 --:-- D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A DAR 01:20 --:-- D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A DHM 01:38 --:-- D
  N26072  250761 N 2017-11-13 2017-11-13 1...... A NCL 02:08 --:-- TF

Seem to be due to using 5-char TimeField for all *_time fields, while it's only scheduled_*_time that have that optional "H" marker, not public_*_time ones.
Hence nullable/nullChars check on TimeField for public times failing when there's an extra random char being captured from the next sibling field.

Guess some special TimeFieldWithHalfMinute can be introduced for scheduled-time fields instead of extending TimeField everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant