From 64df9e87464b3268e71f1b62f9d2d7411ef7e9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Fri, 5 Feb 2021 00:33:30 -0400 Subject: [PATCH 1/3] Added Integrations section --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 875becf..56324ef 100644 --- a/README.md +++ b/README.md @@ -272,3 +272,10 @@ Export a Tyme 3 JSON: ```sh zeit export --format tyme --project "my project" --since "2020-04-01T15:04:05+07:00" --until "2020-04-04T15:04:05+07:00" ``` + +## Integrations + +Here are a few integrations and extensions built by other people that make use of `zeit`: + +- [`zeit-status.sh`](https://github.com/khughitt/dotfiles/blob/master/polybar/scripts/zeit-status.sh), a [Polybar](https://github.com/polybar/polybar) integration for `zeit` by @khughitt +- your link here, feel free to PR! :-) From a67d7497943e27648ef6833a5d8d0dbc3ffbf4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Fri, 5 Feb 2021 00:37:50 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56324ef..5d0526c 100644 --- a/README.md +++ b/README.md @@ -277,5 +277,5 @@ zeit export --format tyme --project "my project" --since "2020-04-01T15:04:05+07 Here are a few integrations and extensions built by other people that make use of `zeit`: -- [`zeit-status.sh`](https://github.com/khughitt/dotfiles/blob/master/polybar/scripts/zeit-status.sh), a [Polybar](https://github.com/polybar/polybar) integration for `zeit` by @khughitt +- [`zeit-status.sh`](https://github.com/khughitt/dotfiles/blob/master/polybar/scripts/zeit-status.sh), a [Polybar](https://github.com/polybar/polybar) integration for `zeit` by [@khughitt](https://github.com/khughitt) (see [#1](https://github.com/mrusme/zeit/issues/1)) - your link here, feel free to PR! :-) From baf6b83d532d9433e8a0e38691f310133dd00602 Mon Sep 17 00:00:00 2001 From: Keith Hughitt Date: Sat, 6 Feb 2021 15:09:32 -0500 Subject: [PATCH 3/3] Fixed an issue resulting --begin time adjustments leading to 0AD date --- z/helpers.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/z/helpers.go b/z/helpers.go index e7b8fca..76e6a60 100644 --- a/z/helpers.go +++ b/z/helpers.go @@ -65,7 +65,6 @@ func RelToTime(timeStr string, ftId int) (time.Time, error) { return time.Now(), errors.New("No match") } - var hours int = 0 var minutes int = 0 @@ -92,11 +91,17 @@ func RelToTime(timeStr string, ftId int) (time.Time, error) { func ParseTime(timeStr string) (time.Time, error) { tfId := GetTimeFormat(timeStr) + t:= time.Now() + switch tfId { case TFAbsTwelveHour: - return time.Parse("3:04pm", timeStr) + tadj, err := time.Parse("3:04pm", timeStr) + tnew := time.Date(t.Year(), t.Month(), t.Day(), tadj.Hour(), tadj.Minute(), t.Second(), t.Nanosecond(), t.Location()) + return tnew, err case TFAbsTwentyfourHour: - return time.Parse("15:04", timeStr) + tadj, err := time.Parse("15:04", timeStr) + tnew := time.Date(t.Year(), t.Month(), t.Day(), tadj.Hour(), tadj.Minute(), t.Second(), t.Nanosecond(), t.Location()) + return tnew, err case TFRelHourMinute, TFRelHourFraction: return RelToTime(timeStr, tfId) default: @@ -160,3 +165,4 @@ func GetGitLog(repo string, since time.Time, until time.Time) (string, string, e stdoutStr, stderrStr := string(stdout.Bytes()), string(stderr.Bytes()) return stdoutStr, stderrStr, nil } +