Skip to content

Commit 445e3f2

Browse files
committed
Converting a time.Time object to a string formatted in UTC (Coordinated Universal Time), ensuring that the time zone is standardized.
1 parent 5241be1 commit 445e3f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/o365/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ func (o *OfficeProcessor) StartSubscriptions() error {
285285
}
286286

287287
func (o *OfficeProcessor) GetContentList(subscription string, startTime time.Time, endTime time.Time) ([]ContentList, error) {
288-
link := GetContentLink(o.TenantId) + fmt.Sprintf("?startTime=%s&endTime=%s&contentType=%s", startTime, endTime, subscription)
288+
link := GetContentLink(o.TenantId) + fmt.Sprintf("?startTime=%s&endTime=%s&contentType=%s",
289+
startTime.UTC().Format("2006-01-02T15:04:05"),
290+
endTime.UTC().Format("2006-01-02T15:04:05"),
291+
subscription)
289292

290293
headers := map[string]string{
291294
"Content-Type": "application/json",

0 commit comments

Comments
 (0)