The best way is to use time.Format with a format of your choosing; if you need to control the way a time is printed, actually control it :) That being said, the documentation of the time package says
The canonical way to strip a monotonic clock reading is to use t = > t.Round(0). i.e. https://play.golang.org/p/YlNLaHkf2p5 On Sun, Feb 4, 2018 at 7:55 AM, Murat Cetin <mceti...@gmail.com> wrote: > When I call > time.Now().String() > I get the following > 2009-11-10 23:00:00 +0000 UTC* m=+0.000000001* > > How can I remove the part with *m=+0.000000001?* > > Thanks, > Murat > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.