Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

formating cloud client list output and fixing timezone issue

  • Loading branch information...
commit e0845a982ed61daf05290daa6a0bc23073ead712 1 parent 091e72e
BuzzTroll authored
View
12 service/client/java/source/src/org/globus/workspace/cloud/client/util/CumulusTask.java
@@ -37,6 +37,7 @@
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
+import java.util.TimeZone;
class CumulusInputStream
extends InputStream
@@ -386,7 +387,6 @@ public void downloadVM(
{
try
{
- System.out.println("SSSS");
String awsAccessKey = this.args.getXferS3ID();
String baseBucketName = this.args.getS3Bucket();
String key = this.makeKey(vmName, null);
@@ -555,7 +555,8 @@ private void s3ObjToFileList(
if(name != null)
{
Date dt = s3Objs[i].getLastModifiedDate();
- cal.setTime(dt);
+ cal.setTimeZone(TimeZone.getTimeZone("GMT"));
+ cal.setTimeInMillis(dt.getTime());
FileListing fl = new FileListing();
@@ -609,8 +610,13 @@ private String convertTime(
{
int hr = cal.get(Calendar.HOUR_OF_DAY);
int m = cal.get(Calendar.MINUTE);
+ String mStr = new Integer(m).toString();
+ if(mStr.length() != 2)
+ {
+ mStr = "0" + mStr;
+ }
- return new Integer(hr).toString() + ":" + new Integer(m).toString();
+ return new Integer(hr).toString() + ":" + mStr;
}
public void chmod(
Please sign in to comment.
Something went wrong with that request. Please try again.