You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The returned string is meant for debugging; for a stable serialized representation, use t.MarshalText, t.MarshalBinary, or t.Format with an explicit format string.
The date format in the job executions are the "right" ones - I would think.
I would propose using the t.MarshalText as suggested by the golang people!
@davidgengenbach I suspect the format in the webhook template is how it is because it is intended to be human readable, whereas the API returns computer readable values. Maybe @Victorcoder can confirm this.
Nevertheless it is better to use t.MarshalText or the likes, as you mentioned. All that needs to be agreed on is the right format, and I'll whip up a PR.
Describe the bug
The date format differs between in
started_at
,finished_at
)2019-12-12T22:57:47.782Z
2019-12-13 01:03:00.024564011 +0000 UTC
To Reproduce
Expected behavior
The execution timestamps should have the same format as the webhook notifications.
Specifications:
Linux david 5.3.14-200.fc30.x86_64 #1 SMP Mon Dec 2 15:57:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Dkron 2.0.0
Additional context
From the golang time documentation:
The date format in the job executions are the "right" ones - I would think.
I would propose using the
t.MarshalText
as suggested by the golang people!These are the places where the fields are defined/marshalled:
Webhooks: https://github.com/distribworks/dkron/blob/master/dkron/notifier.go#L86
Executions: https://github.com/distribworks/dkron/blob/master/dkron/execution.go#L18
The text was updated successfully, but these errors were encountered: