The following is test feedback from Derek
xdusage doesn’t object to -s with future date:
[dsimmel@br006:~]$ /usr/bin/time --format="(Time for command to complete: %E)" xdusage -r bridges.psc.xsede -s 2018-08-25
Project: TG-ASC160051/bridges.psc.xsede status=inactive
PI: Blood, Philip
Usage Period: 2018-08-25/2018-08-24
Usage=0 Jobs=0
Simmel, Derek portal=dsimmel status=inactive usage=0 jobs=0
xdusage does not object to start date (-s) later than end date (-e), and results do not cover time period:
[dsimmel@br006:~]$ /usr/bin/time --format="(Time for command to complete: %E)" xdusage -r bridges.psc.xsede -s 2018-08-25 -e 2018-08-21
Project: TG-ASC160051/bridges.psc.xsede status=inactive
PI: Blood, Philip
Usage Period: 2018-08-25/2018-08-21
Usage=0 Jobs=0
Simmel, Derek portal=dsimmel status=inactive usage=0 jobs=0
Project: TG-IBN180004/bridges.psc.xsede
PI: Ropelewski, Alexander John
Usage Period: 2018-08-25/2018-08-21
Usage=0 Jobs=0
Simmel, Derek portal=dsimmel usage=0 jobs=0
Project: TG-IRI160006/bridges.psc.xsede
PI: Hazlewood, Victor
Usage Period: 2018-08-25/2018-08-21
Usage=0 Jobs=0
Simmel, Derek portal=dsimmel status=inactive usage=0 jobs=0
Project: TG-IRI160007/bridges.psc.xsede
PI: Hazlewood, Victor
Usage Period: 2018-08-25/2018-08-21
Usage=0 Jobs=0
Simmel, Derek portal=dsimmel usage=0 jobs=0
I did not make any changes to the code that checks the command line parameters and the previous test plan didn't include tests for them. I should have added some.
The code does contain a check for the end date preceding the start date (from the previous version of the code) but evidently it isn't working "error ("end date can't precede start date") if ($sdate && $edate && $sdate > $edate);"
The code doesn't make any checks about the starting date being in the future.
Hi Peter,
Since this is a minor change, can you implement it? And then let Derek know when it's ready so he can re-test?
Thanks,
Shava
The date validation wasn't working because the script was converting the dates into another format and then comparing them and that wouldn't work with that format. I just switched the order of the code and it works now. I cleaned up some of the error messages in the date handling code and added a check that the start date wasn't in the future.
Peter - when I test with -s (later_date) -e (earlier_data), do the results reflect the time period correctly despite the incorrect order of dates? e.g.,