Skip to content

Commit eb4ae36

Browse files
authored
Update dump file name to be compatible with all platforms including Windows (#750)
* Update dump file name to be compatible with all platforms including Windows Signed-off-by: Leo Christy Jesuraj <[email protected]> * Add timezone separately Signed-off-by: Leo Christy Jesuraj <[email protected]> --------- Signed-off-by: Leo Christy Jesuraj <[email protected]>
1 parent 277eae0 commit eb4ae36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/webspherelibertydump_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ func (r *ReconcileWebSphereLibertyDump) Reconcile(ctx context.Context, request c
107107
return reconcile.Result{}, nil
108108
}
109109

110-
time := time.Now()
110+
currentTime := time.Now()
111111
dumpFolder := "/serviceability/" + pod.Namespace + "/" + pod.Name
112-
dumpFileName := dumpFolder + "/" + time.Format("2006-01-02_15:04:05") + ".zip"
112+
dumpFileName := dumpFolder + "/" + "dump_" + currentTime.UTC().Format("2006.01.02_15.04.05") + "_utc.zip"
113113
dumpCmd := "mkdir -p " + dumpFolder + " && server dump --archive=" + dumpFileName
114114
if len(instance.Spec.Include) > 0 {
115115
dumpCmd += " --include="

0 commit comments

Comments
 (0)