Run of fresh-snapshots for golang-github-jinzhu-now

Try this locally (using silver-platter):

debian-svp new-upstream --snapshot golang-github-jinzhu-now 

Merge these changes:

Summary

Merged new upstream version: 1.1.2 (was: 1.1.1).

Diff

Branch: main

diff --git a/README.md b/README.md
index 3add6bf..f9d715d 100644
--- a/README.md
+++ b/README.md
@@ -27,9 +27,6 @@ now.BeginningOfMonth()         // 2013-11-01 00:00:00 Fri
 now.BeginningOfQuarter()       // 2013-10-01 00:00:00 Tue
 now.BeginningOfYear()          // 2013-01-01 00:00:00 Tue
 
-now.WeekStartDay = time.Monday // Set Monday as first day, default is Sunday
-now.BeginningOfWeek()          // 2013-11-18 00:00:00 Mon
-
 now.EndOfMinute()              // 2013-11-18 17:51:59.999999999 Mon
 now.EndOfHour()                // 2013-11-18 17:59:59.999999999 Mon
 now.EndOfDay()                 // 2013-11-18 23:59:59.999999999 Mon
diff --git a/debian/changelog b/debian/changelog
index 237f8d5..ec43361 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-jinzhu-now (1.1.2-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 09 Apr 2021 11:11:24 -0000
+
 golang-github-jinzhu-now (1.1.1-1) unstable; urgency=medium
 
   * Add debian/watch
diff --git a/main.go b/main.go
index c996a8a..3225e26 100644
--- a/main.go
+++ b/main.go
@@ -19,7 +19,7 @@ var TimeFormats = []string{
 	"2006", "2006-1", "2006-1-2", "2006-1-2 15", "2006-1-2 15:4", "2006-1-2 15:4:5", "1-2",
 	"15:4:5", "15:4", "15",
 	"15:4:5 Jan 2, 2006 MST", "2006-01-02 15:04:05.999999999 -0700 MST", "2006-01-02T15:04:05-07:00",
-	"2006.1.2", "2006.1.2 15:04:05", "2006.01.02", "2006.01.02 15:04:05",
+	"2006.1.2", "2006.1.2 15:04:05", "2006.01.02", "2006.01.02 15:04:05", "2006.01.02 15:04:05.999999999",
 	"1/2/2006", "1/2/2006 15:4:5", "2006/01/02", "2006/01/02 15:04:05",
 	time.ANSIC, time.UnixDate, time.RubyDate, time.RFC822, time.RFC822Z, time.RFC850,
 	time.RFC1123, time.RFC1123Z, time.RFC3339, time.RFC3339Nano,
diff --git a/now.go b/now.go
index 353835a..84c2b52 100644
--- a/now.go
+++ b/now.go
@@ -152,9 +152,9 @@ func (now *Now) Parse(strs ...string) (t time.Time, err error) {
 	var (
 		setCurrentTime  bool
 		parseTime       []int
-		currentTime     = []int{now.Nanosecond(), now.Second(), now.Minute(), now.Hour(), now.Day(), int(now.Month()), now.Year()}
 		currentLocation = now.Location()
 		onlyTimeInStr   = true
+		currentTime  = formatTimeToList(now.Time)
 	)
 
 	for _, str := range strs {
@@ -162,8 +162,7 @@ func (now *Now) Parse(strs ...string) (t time.Time, err error) {
 		onlyTimeInStr = hasTimeInStr && onlyTimeInStr && onlyTimeRegexp.MatchString(str)
 		if t, err = now.parseWithFormat(str, currentLocation); err == nil {
 			location := t.Location()
-
-			parseTime = []int{t.Nanosecond(), t.Second(), t.Minute(), t.Hour(), t.Day(), int(t.Month()), t.Year()}
+			parseTime = formatTimeToList(t)
 
 			for i, v := range parseTime {
 				// Don't reset hour, minute, second if current time str including time
@@ -190,7 +189,7 @@ func (now *Now) Parse(strs ...string) (t time.Time, err error) {
 			}
 
 			t = time.Date(parseTime[6], time.Month(parseTime[5]), parseTime[4], parseTime[3], parseTime[2], parseTime[1], parseTime[0], location)
-			currentTime = []int{t.Nanosecond(), t.Second(), t.Minute(), t.Hour(), t.Day(), int(t.Month()), t.Year()}
+			currentTime = formatTimeToList(t)
 		}
 	}
 	return
diff --git a/time.go b/time.go
new file mode 100644
index 0000000..52dd8b2
--- /dev/null
+++ b/time.go
@@ -0,0 +1,9 @@
+package now
+
+import "time"
+
+func formatTimeToList(t time.Time) []int {
+	hour, min, sec := t.Clock()
+	year, month, day := t.Date()
+	return []int{t.Nanosecond(), sec, min, hour, day, int(month), year}
+}

Branch: pristine-tar

diff --git a/golang-github-jinzhu-now_1.1.2.orig.tar.gz.delta b/golang-github-jinzhu-now_1.1.2.orig.tar.gz.delta
new file mode 100644
index 0000000..4ec72bf
Binary files /dev/null and b/golang-github-jinzhu-now_1.1.2.orig.tar.gz.delta differ
diff --git a/golang-github-jinzhu-now_1.1.2.orig.tar.gz.id b/golang-github-jinzhu-now_1.1.2.orig.tar.gz.id
new file mode 100644
index 0000000..f14071d
--- /dev/null
+++ b/golang-github-jinzhu-now_1.1.2.orig.tar.gz.id
@@ -0,0 +1 @@
+2a50d830dbd340d15102a0ddd6113b20f08236fe

Branch: upstream

Tag: upstream/1.1.2

Diff is too long (more than 200 lines). Download the raw diff.

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/gocode/src/github.com/jinzhu/now/time.go

No differences were encountered in the control files

Resulting package

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots golang-github-jinzhu-now-dev

Lintian Result

Full worker log Full build log Full dist log