Skip to content

time: RFC3339Nano returns different results of different OS. #28598

@3timeslazy

Description

@3timeslazy

What version of Go are you using (go version)?

$ go version
go version go1.11.2 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Mac OS:
- GOARCH="amd64"
- GOOS="darwin"

Linux:
- GOARCH="amd64"
- GOOS="linux"

What did you do?

package main

import (
	"fmt"
	"time"
)

func main() {
	t := time.Date(2018, time.November, 5, 0, 54, 15, 5125, time.Local)
	fmt.Println(t.Format(time.RFC3339Nano))
}

What did you expect to see?

I expect to see the same result on all OS. Ex. 2018-11-05T00:54:15.000005125+03:00

What did you see instead?

On Mac OS: 2018-11-05T00:54:15.000005125+03:00
On Linux: 2018-11-05T00:54:15.000005125Z

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions