Skip to content

Instantly share code, notes, and snippets.

@AshikNesin
Created July 28, 2016 10:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshikNesin/da2a9542edea91077c6126c4004dd581 to your computer and use it in GitHub Desktop.
Save AshikNesin/da2a9542edea91077c6126c4004dd581 to your computer and use it in GitHub Desktop.
[JS] Implicit Convert HH:MM:SS to Date Object
function toDateWithOutTimeZone(date) {
let tempTime = date.split(":");
let dt = new Date();
dt.setHours(tempTime[0]);
dt.setMinutes(tempTime[1]);
dt.setSeconds(tempTime[2]);
return dt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment