Skip to content

Commit 0f7c7dc

Browse files
committed
fix: use OmitTimeZone for dates passed to backend for dashboard
1 parent bf736fe commit 0f7c7dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

time/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Validate(value string) error {
4646
func ParseTime(now time.Time, value string, startOf bool, weekday time.Weekday) (time.Time, error) {
4747
parse, err := time.Parse(time.RFC3339, value)
4848
if err == nil {
49-
return parse, nil
49+
return model.Time(parse).OmitTimeZone(), nil
5050
}
5151

5252
return timemath.Parse(now, value, startOf, weekday)

ui/src/utils/range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const exclusiveRange = (range: Range) => ({from: range.from, to: range.to
2020
export function normalizeDate(date: string): string {
2121
const d = moment(date);
2222
if (d.isValid()) {
23-
return d.utc().format();
23+
return d.format();
2424
} else {
2525
return date;
2626
}

0 commit comments

Comments
 (0)