Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Zeropad minutes
Timestamps with minute count lower than 10 should be zeropadded such that `19:6` becomes `19:06`.
  • Loading branch information
LayZeeDK authored Nov 20, 2017
commit ebb29255bc5e149d9c782e04243d435bec3103f4
4 changes: 2 additions & 2 deletions src/data-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let physicalStructProvider = ([initialNodes, initialContainers]) => {
let imageNameRegex = /([^/]+?)(\:([^/]+))?$/;
let imageNameMatches = imageNameRegex.exec(cloned.Spec.ContainerSpec.Image);
let tagName = imageNameMatches[3];
let dateStamp = dt.getDate() + "/" + (dt.getMonth() + 1) + " " + dt.getHours() + ":" + dt.getMinutes();
let dateStamp = dt.getDate() + "/" + (dt.getMonth() + 1) + " " + dt.getHours() + ":" + _.padStart(dt.getMinutes(), 2, "0");
let startState = cloned.Status.State;


Expand Down Expand Up @@ -287,4 +287,4 @@ class DataProvider extends EventEmitter {
}
}

export default SINGLETON = new DataProvider();
export default SINGLETON = new DataProvider();