Add UTCNow() function. (#3931)

This patch adds UTCNow() function which returns current UTC time.

This is equivalent of UTCNow() == time.Now().UTC()
This commit is contained in:
Bala FA
2017-03-18 23:58:41 +05:30
committed by Harshavardhana
parent 3a6111eff5
commit 1c97dcb10a
52 changed files with 154 additions and 154 deletions

View File

@@ -31,7 +31,7 @@ import (
)
func TestGetCurrentReleaseTime(t *testing.T) {
minioVersion1 := time.Now().UTC().Format(time.RFC3339)
minioVersion1 := UTCNow().Format(time.RFC3339)
releaseTime1, _ := time.Parse(time.RFC3339, minioVersion1)
minioVersion2 := "DEVELOPMENT.GOGET"
@@ -223,7 +223,7 @@ func TestIsSourceBuild(t *testing.T) {
minioVersion string
expectedResult bool
}{
{time.Now().UTC().Format(time.RFC3339), false},
{UTCNow().Format(time.RFC3339), false},
{"DEVELOPMENT.GOGET", true},
{"junk", true},
{"3.2.4", true},