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

When creating new schedule, gracefully handle intervals like "8-12" #15

Open
smithfarm opened this issue Feb 28, 2017 · 0 comments
Open
Labels

Comments

@smithfarm
Copy link
Owner

smithfarm commented Feb 28, 2017

Currently if you enter an interval like "8-12" an awful error message is generated:

DBI reports DBD::Pg::st execute failed: ERROR: invalid input syntax for type timestamp with time zone: "2015-03-23 8" at /usr/lib/perl5/site_perl/5.18.2/App/Dochazka/REST/Model/Schedintvls.pm line 157.

One option would be for the JS to transparently add :00 before sending it on to the server.

An even better option would be to do the transformations server-side, in handler_schedule_new - for example, if it received an interval "[2015-05-25 8, 2015-05-25 12)", it would convert it to "[2015-05-25 8:00, 2015-05-25 12:00)". It could also take intervals like "MON 8-12".

@smithfarm smithfarm changed the title "Create a schedule" could handle intervals like "8-12" When creating new schedule, gracefully handle intervals like "8-12" Feb 28, 2017
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

1 participant