This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new bd172d256 fix: format timeAfter to RFC3339 for updated_on (#4508)
bd172d256 is described below

commit bd172d256f6eb1168070b02e34a1fc96221ccf65
Author: Likyh <[email protected]>
AuthorDate: Thu Feb 23 22:57:58 2023 +0800

    fix: format timeAfter to RFC3339 for updated_on (#4508)
---
 backend/plugins/bitbucket/tasks/api_common.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/backend/plugins/bitbucket/tasks/api_common.go 
b/backend/plugins/bitbucket/tasks/api_common.go
index bb20a5100..5aa43a0fe 100644
--- a/backend/plugins/bitbucket/tasks/api_common.go
+++ b/backend/plugins/bitbucket/tasks/api_common.go
@@ -28,6 +28,7 @@ import (
        "net/http"
        "net/url"
        "reflect"
+       "time"
 )
 
 type BitbucketApiParams struct {
@@ -100,10 +101,10 @@ func GetQueryCreatedAndUpdated(fields string, 
collectorWithState *api.ApiCollect
                query.Set("fields", fields)
                query.Set("sort", "created_on")
                if collectorWithState.IsIncremental() {
-                       latestSuccessStart := 
collectorWithState.LatestState.LatestSuccessStart.Format("2006-01-02")
+                       latestSuccessStart := 
collectorWithState.LatestState.LatestSuccessStart.Format(time.RFC3339)
                        query.Set("q", fmt.Sprintf("updated_on>=%s", 
latestSuccessStart))
                } else if collectorWithState.TimeAfter != nil {
-                       timeAfter := 
collectorWithState.TimeAfter.Format("2006-01-02")
+                       timeAfter := 
collectorWithState.TimeAfter.Format(time.RFC3339)
                        query.Set("q", fmt.Sprintf("updated_on>=%s", timeAfter))
                }
 

Reply via email to