Skip to content

Instantly share code, notes, and snippets.

@alecjacobson
Last active June 24, 2020 14:35
Show Gist options
  • Save alecjacobson/91e718a914db937e3e4043050d893a3a to your computer and use it in GitHub Desktop.
Save alecjacobson/91e718a914db937e3e4043050d893a3a to your computer and use it in GitHub Desktop.
bookmarklet to find all times (00:00), assume they're in GMT, and convert to determined local time
javascript:( function(){document.body.innerHTML = document.body.innerHTML.replace(/[0-9]+(:[0-9][0-9])+( (am|pm|a.m.|p.m.))*/gi,str => "<span style='color:#f45;font-weight:bold;'>"+new Date("1/1/2020 "+str+" GMT").toLocaleTimeString([], {hour: '2-digit', minute:'2-digit',hour12:false})+"</span>")}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment