> + * Static utility method to convert a Python timestamp to a Java {@link
> Date}. For example,
> + * the timestamp returned from the API is a String in the form
> "1368738007.90714".
> + * This method handles the necessary conversion.
> + *
> + * @param inTimestamp the timestamp to convert.
> + *
> + * @return the converted {@link Date}
> + *
> + * @see Python's <a
> href="http://docs.python.org/2/library/time.html"><code>time.time()</code></a>
> method
> + */
> + public static Date convertTimestamp(String inTimestamp) {
> + checkNotNull(inTimestamp, "inTimestamp");
> + Float timestamp = Float.parseFloat(inTimestamp) * 1000;
> +
> + return new Date(timestamp.longValue());
> + }
Extract these three utility methods to another class? They don't seem to
contain any SwiftResource-specific code.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/17/files#r6383535