When running sls rollback -t 1546961025152 the timestamp was being parsed as a string inside a Date Object.
This would return an Invalid Date, therefore, failing to convert the timestamp into a valid date.
In here we are checking to see if the date is already a valid one, otherwise convert the timestamp to a number and try again.
We are checking first because most cases we don't want to convert to numbers.
Fix#5664
Ps: We could add another check, if the date is still invalid, throw an Error, but that's not the scope of the issue.
Signed-off-by: Luan <luan@luanmuniz.com.br>
Remove the errant (but understandable) distributed usage of region and stage settings. This otherwise locks in a multitude of bugs around the improper algorithm for selecting (given all context) the proper region or stage setting. Instead, all code should use the centralized algorithm for determining such values. This creates a strange first and second class configuration concept but these two are sufficiently varied and complex in their creation and use that this seems appropriate.
Delete bucket was still using them
Hopefully all :)
Further test fixes.
.... worked too long yesterday
Fixed Variable tests
Remove not used parameters from request() and add options with warning