aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.54k stars 4.13k forks source link

Unable to supply a timestamp for SWF commands #91

Closed garnaat closed 11 years ago

garnaat commented 11 years ago

The current handling of timestamp parameters is broken for SWF which wants timestamps to be supplied in epoch times rather than ISO-8601.

bash-3.2$ ~/local/bin/aws swf list-closed-workflow-executions --domain domain --close-time-filter '{"oldest_date":"2012-12-19T02:42:39.000Z", "latest_date":"2012-12-19T02:42:39.000Z"}'
{
    "Message": "class java.lang.String can not be converted to milliseconds since epoch", 
    "__type": "com.amazon.coral.service#SerializationException"
}
A client error (Unknown) occurred: Unknown
bash-3.2$ ~/local/bin/aws swf list-closed-workflow-executions --domain domain --close-time-filter '{"oldest_date":"136431000", "latest_date":"1364316087"}'
Unable to convert value (136431000) to type timestamp
bash-3.2$ ~/local/bin/aws swf list-closed-workflow-executions --domain domain --close-time-filter '{"oldest_date":"136431000000", "latest_date":"1364316087000"}'
Unable to convert value (136431000000) to type timestamp
garnaat commented 11 years ago

This should be fixed with f6fa62b8dcbfed7c1b38ffea0eaf99ad9ac52132