Skip to content

Instantly share code, notes, and snippets.

@stemar94
Last active September 10, 2015 08:53
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 stemar94/21ebfbf673ea783b9205 to your computer and use it in GitHub Desktop.
Save stemar94/21ebfbf673ea783b9205 to your computer and use it in GitHub Desktop.
time: fixed handling of "5" in Format's layout string Fixes #12440
diff --git a/src/time/format.go b/src/time/format.go
index 873d3ff..6cf7946 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -518,7 +518,7 @@
case stdZeroMinute:
b = appendInt(b, min, 2)
case stdSecond:
- b = appendInt(b, sec, 2)
+ b = appendInt(b, sec, 0)
case stdZeroSecond:
b = appendInt(b, sec, 2)
case stdPM:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment