Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for UnixMicro (0.1 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go

    func TestMicroTimeUnmarshalJSONAndProtoEqual(t *testing.T) {
    	cases := []struct {
    		name   string
    		input  MicroTime
    		result bool
    	}{
    		{"nanosecond level precision", UnixMicro(123, 123123123), true},
    		{"microsecond level precision", UnixMicro(123, 123123000), true},
    	}
    
    	for _, c := range cases {
    		t.Run(c.name, func(t *testing.T) {
    			jsonData, err := c.input.MarshalJSON()
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/time/example_test.go

    	// Output:
    	// 1257894000
    	// 2009-11-10 23:00:00 +0000 UTC
    }
    
    func ExampleUnixMicro() {
    	umt := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
    	fmt.Println(umt.UnixMicro())
    	t := time.UnixMicro(umt.UnixMicro()).UTC()
    	fmt.Println(t)
    
    	// Output:
    	// 1257894000000000
    	// 2009-11-10 23:00:00 +0000 UTC
    }
    
    func ExampleUnixMilli() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  3. api/go1.17.txt

    pkg time, const Layout = "01/02 03:04:05PM '06 -0700"
    pkg time, const Layout ideal-string
    pkg time, func UnixMicro(int64) Time
    pkg time, func UnixMilli(int64) Time
    pkg time, method (Time) GoString() string
    pkg time, method (Time) IsDST() bool
    pkg time, method (Time) UnixMicro() int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 18K bytes
    - Viewed (0)
Back to top