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

silent NaN entries on badly formatted date #32

Closed
hackergrrl opened this issue Jan 25, 2016 · 4 comments
Closed

silent NaN entries on badly formatted date #32

hackergrrl opened this issue Jan 25, 2016 · 4 comments
Assignees
Labels

Comments

@hackergrrl
Copy link

$ clocker add "2016-01-25-8:45" "2016-01-25-10:20"

$ clocker list
NaN  NaN-NaN-NaN  [ NaN:NaN:NaN - NaN:NaN:NaN ]  (NaN:NaN:NaN)

These are impossible to get rid of using clocker rm -- their STAMP can't be referenced to.

clocker should error out on badly formatted dates.

@hackergrrl hackergrrl changed the title including an incorrect date results in silent NaN entries including an incorrectly formatted date results in silent NaN entries Jan 25, 2016
@hackergrrl hackergrrl changed the title including an incorrectly formatted date results in silent NaN entries silent NaN entries on badly formatted date Jan 25, 2016
@fnogatz fnogatz self-assigned this Feb 20, 2016
@fnogatz fnogatz added the bug label Feb 20, 2016
fnogatz added a commit that referenced this issue Feb 23, 2016
…bstack/parse-messy-time like the "set" command.

This does not solve issue #32 at all, as substack/parse-messy-time still accepts an invalid date like "2016-01-23-12:34:45"and interprets it as "2016 hours in future".
Further investigation in substack/parse-messy-time.
@fnogatz
Copy link
Owner

fnogatz commented Feb 23, 2016

I added a patch and published it as v1.11.3. Nevertheless this does not solve the issue at all, as substack/parse-messy-time still accepts an invalid date like "2016-01-23-12:34:45"and interprets it as "the day of 2016 hours in future". Further investigation in substack/parse-messy-time#5.

@coreyjewett
Copy link
Contributor

I encountered this almost immediately playing with with clocker. I introduced NaN by trying to specify a STAMP as the start time:

$> clocker set 1512201600 start 1512235800
$> clocker list
NaN  NaN-NaN-NaN  [ NaN:NaN:NaN - NOW ]  (NaN:NaN:NaN)

If you notice the problem immediately then you can repair the record using set because it will modify the last record:

$> clocker set start 09:30

This only addresses a sub-usecase of @noffle's problem.

coreyjewett added a commit to coreyjewett/clocker that referenced this issue Dec 2, 2017
…e start time was erroneously set to NaN. Workaround for fnogatz#32.
coreyjewett added a commit to coreyjewett/clocker that referenced this issue Dec 2, 2017
…e start time was erroneously set to NaN. Workaround for fnogatz#32.
@fnogatz
Copy link
Owner

fnogatz commented Jan 30, 2018

@coreyjewett I have added support for timestamps in v1.11.4.

@fnogatz
Copy link
Owner

fnogatz commented Jan 30, 2018

To directly address already set NaN entries, we will continue in #34.

@fnogatz fnogatz closed this as completed Jan 30, 2018
fnogatz pushed a commit that referenced this issue Jan 30, 2018
* constantize strftime format

* Special case for STAMP == "NaN". Necessary for retrieving record whose start time was erroneously set to NaN. Workaround for #32.

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

No branches or pull requests

3 participants