Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ISO8601Format (0.18 sec)

  1. internal/amztime/iso8601_time.go

    	iso8601TimeFormatLong = "2006-01-02T15:04:05.000000Z" // Reply date format with nanosecond precision.
    )
    
    // ISO8601Format converts time 't' into ISO8601 time format expected in AWS S3 spec.
    //
    // This function is needed to avoid a Go's float64 precision bug, where Go avoids
    // padding the extra '0' before the timezone.
    func ISO8601Format(t time.Time) string {
    	value := t.Format(iso8601TimeFormat)
    	if len(value) < len(iso8601TimeFormat) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 16 23:38:33 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. internal/amztime/iso8601_time_test.go

    			expectedOutput: "2009-11-13T04:51:01.941Z",
    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.expectedOutput, func(t *testing.T) {
    			gotOutput := ISO8601Format(testCase.date)
    			t.Log("Go", testCase.date.Format(iso8601TimeFormat))
    			if gotOutput != testCase.expectedOutput {
    				t.Errorf("Expected %s, got %s", testCase.expectedOutput, gotOutput)
    			}
    		})
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Dec 12 18:28:30 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  3. internal/amztime/parse.go

    package amztime
    
    import (
    	"errors"
    	"net/http"
    	"time"
    )
    
    // Supported amz date formats.
    var amzDateFormats = []string{
    	// Do not change this order, x-amz-date format is usually in
    	// iso8601Format rest are meant for relaxed handling of other
    	// odd SDKs that might be out there.
    	"20060102T150405Z",
    	time.RFC1123,
    	time.RFC1123Z,
    	// Add new AMZ date formats here.
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle-handlers.go

    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	if withUpdatedAt {
    		w.Header().Set(xhttp.MinIOLifecycleCfgUpdatedAt, updatedAt.Format(iso8601Format))
    	}
    	// Write lifecycle configuration to client.
    	writeSuccessResponseXML(w, configData)
    }
    
    // DeleteBucketLifecycleHandler - This HTTP handler removes bucket lifecycle configuration.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 7K bytes
    - Viewed (0)
  5. cmd/signature-v4-parser.go

    	if aec != ErrNone {
    		return psv, aec
    	}
    
    	var e error
    	// Save date in native time.Time.
    	preSignV4Values.Date, e = time.Parse(iso8601Format, query.Get(xhttp.AmzDate))
    	if e != nil {
    		return psv, ErrMalformedPresignedDate
    	}
    
    	// Save expires in native time.Duration.
    	preSignV4Values.Expires, e = time.ParseDuration(query.Get(xhttp.AmzExpires) + "s")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top