{ "titlu": "GPT", "continut": "In Go, the layout you used:\r\n\r\n```go\r\ntime.Now().Format(\"2006-01-02-150405.666666\")\r\n```\r\n\r\ndoes **not show nanoseconds**, it shows **microseconds (6 digits)**.\r\n\r\n### Go time formatting rule\r\n\r\nGo uses the reference time:\r\n\r\n```\r\nMon Jan 2 15:04:05 MST 2006\r\n```\r\n\r\nFractional seconds are controlled by the number of `9` or `0` digits.\r\n\r\n### Nanoseconds (9 digits)\r\n\r\nUse **9 digits**:\r\n\r\n```go\r\ntime.Now().Format(\"2006-01-02-150405.000000000\")\r\n```\r\n\r\nExample output:\r\n\r\n```\r\n2026-03-05-143512.123456789\r\n```\r\n\r\n### Recommended way (auto trim zeros)\r\n\r\nBetter is using `9` instead of `0`:\r\n\r\n```go\r\ntime.Now().Format(\"2006-01-02-150405.999999999\")\r\n```\r\n\r\nExample outputs:\r\n\r\n```\r\n2026-03-05-143512.1\r\n2026-03-05-143512.12345\r\n2026-03-05-143512.123456789\r\n```\r\n\r\nTrailing zeros are removed.\r\n\r\n### If you want guaranteed nanoseconds\r\n\r\nUse:\r\n\r\n```go\r\ntime.Now().Format(\"2006-01-02-150405.000000000\")\r\n```\r\n\r\n### Alternative (manual)\r\n\r\nYou can also append them:\r\n\r\n```go\r\nt := time.Now()\r\nfmt.Printf(\"%s.%09d\\n\", t.Format(\"2006-01-02-150405\"), t.Nanosecond())\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n2026-03-05-143512.123456789\r\n```\r\n\r\n---\r\n\r\n✅ **Summary**\r\n\r\n| Format | Result |\r\n| ------------ | ------------------- |\r\n| `.666666` | microseconds |\r\n| `.000000000` | nanoseconds fixed |\r\n| `.999999999` | nanoseconds trimmed |\r\n\r\n---\r\n\r\nIf you're using this for **unique filenames**, I can show a **better collision-safe timestamp format used in high-performance Go systems**.\r\n" }