Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 14, 2021 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/ad2f92c88be8887359679cc64bd08a2a to your computer and use it in GitHub Desktop.
Save parzibyte/ad2f92c88be8887359679cc64bd08a2a to your computer and use it in GitHub Desktop.
func segundosASegundosMinutosYHoras(segundos int) string {
horas := int(segundos / 60 / 60)
segundos -= horas * 60 * 60
minutos := int(segundos / 60)
segundos -= (minutos * 60)
return fmt.Sprintf("%02d:%02d:%02d", horas, minutos, segundos)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment