@@ -417,8 +417,11 @@ The syntax for this function requires a timestamp format as a single argument. S
417417| Template Example | Output |
418418| :------------------------------------------------------------------ | :------------------------------------- |
419419| ` {{ .WindowStartUTC "2006-01-02T15:04:05Z" }} ` | ` 2024-03-07T20:15:56Z ` |
420+ | ` {{ .WindowStartUTC "yyyy-MM-ddTHH:mm:ssZ" }} ` | ` 2024-03-07T20:15:56Z ` |
420421| ` {{ .WindowStartUTC "2006-01-02T15:04:05.999999Z07:00" }} ` | ` 2024-03-07T20:15:56.905571Z ` |
422+ | ` {{ .WindowStartUTC "yyyy-MM-ddTHH:mm:ss.SSSSSSZ" }} ` | ` 2024-03-07T20:15:56.905571Z ` |
421423| ` greaterThan:{{ .WindowStartUTC "2006-01-02T15:04:05.999Z07:00" }} ` | ` greaterThan:2024-03-07T20:15:56.905Z ` |
424+ | ` greaterThan:{{ .WindowStartUTC "yyyy-MM-ddTHH:mm:ss.SSSZ" }} ` | ` greaterThan:2024-03-07T20:15:56.905Z ` |
422425
423426### WindowStartLocation
424427
@@ -437,8 +440,11 @@ Refer to the [TZ identifier](https://en.wikipedia.org/wiki/List_of_tz_database_t
437440| Template Example | Output |
438441| :--------------------------------------------------------------------------------------- | :------------------------------------------ |
439442| ` {{ .WindowStartLocation "US/Eastern" "2006-01-02T15:04:05Z" }} ` | ` 2024-03-07T15:15:56-05:00 ` |
443+ | ` {{ .WindowStartLocation "US/Eastern" "yyyy-MM-ddTHH:mm:ssZ" }} ` | ` 2024-03-07T15:15:56-05:00 ` |
440444| ` {{ .WindowStartLocation "US/Pacific" "2006-01-02T15:04:05.999999Z07:00" }} ` | ` 2024-03-07T12:15:56.905-08:00 ` |
445+ | ` {{ .WindowStartLocation "US/Pacific" "yyyy-MM-ddTHH:mm:ss.SSSSSSZ" }} ` | ` 2024-03-07T12:15:56.905-08:00 ` |
441446| ` greaterThan:{{ .WindowStartLocation "Europe/Berlin" "2006-01-02T15:04:05.999Z07:00" }} ` | ` greaterThan:2024-03-07T21:15:56.905+01:00 ` |
447+ | ` greaterThan:{{ .WindowStartLocation "Europe/Berlin" "yyyy-MM-ddTHH:mm:ss.SSSZ" }} ` | ` greaterThan:2024-03-07T21:15:56.905+01:00 ` |
442448
443449### WindowEndUTC
444450
@@ -453,10 +459,13 @@ The syntax for this function requires a timestamp format as a single argument. R
453459| Template Example | Output |
454460| :------------------------------------------------------------- | :---------------------------------- |
455461| ` {{ .WindowEndUTC "2006-01-02T15:04:05Z" }} ` | ` 2024-03-07T20:15:56Z ` |
462+ | ` {{ .WindowEndUTC "yyyy-MM-ddTHH:mm:ssZ" }} ` | ` 2024-03-07T20:15:56Z ` |
456463| ` {{ .WindowEndUTC "2006-01-02T15:04:05.999999Z07:00" }} ` | ` 2024-03-07T20:15:56.905571Z ` |
464+ | ` {{ .WindowEndUTC "yyyy-MM-ddTHH:mm:ss.SSSSSSZ" }} ` | ` 2024-03-07T20:15:56.905571Z ` |
457465| ` {{ .WindowEndUTC "epoch" }} ` | ` 1709842556 ` |
458466| ` {{ .WindowEndUTC "epochMilli" }} ` | ` 1709842556000 ` |
459467| ` lessThan:{{ .WindowEndUTC "2006-01-02T15:04:05.999Z07:00" }} ` | ` lessThan:2024-03-07T20:15:56.905Z ` |
468+ | ` lessThan:{{ .WindowEndUTC "yyyy-MM-ddTHH:mm:ss.SSSZ" }} ` | ` lessThan:2024-03-07T20:15:56.905Z ` |
460469
461470### WindowEndLocation
462471
@@ -475,52 +484,57 @@ Refer to the [TZ identifier](https://en.wikipedia.org/wiki/List_of_tz_database_t
475484| Template Example | Output |
476485| :---------------------------------------------------------------------------------- | :--------------------------------------- |
477486| ` {{ .WindowEndLocation "US/Eastern" "2006-01-02T15:04:05Z" }} ` | ` 2024-03-07T15:15:56-05:00 ` |
487+ | ` {{ .WindowEndLocation "US/Eastern" "yyyy-MM-ddTHH:mm:ssZ" }} ` | ` 2024-03-07T15:15:56-05:00 ` |
478488| ` {{ .WindowEndLocation "US/Pacific" "2006-01-02T15:04:05.999999Z07:00" }} ` | ` 2024-03-07T12:15:56.905-08:00 ` |
489+ | ` {{ .WindowEndLocation "US/Pacific" "yyyy-MM-ddTHH:mm:ss.SSSSSSZ" }} ` | ` 2024-03-07T12:15:56.905-08:00 ` |
479490| ` lessThan:{{ .WindowEndLocation "Europe/Berlin" "2006-01-02T15:04:05.999Z07:00" }} ` | ` lessThan:2024-03-07T21:15:56.905+01:00 ` |
491+ | ` lessThan:{{ .WindowEndLocation "Europe/Berlin" "yyyy-MM-ddTHH:mm:ss.SSSZ" }} ` | ` lessThan:2024-03-07T21:15:56.905+01:00 ` |
480492
481493## Timestamp Formatting
482494
483- The source uses the the [ Go programming language timestamp formatting] ( https://go.dev/src/time/format.go ) . See the table below for references and examples.
495+ The source uses the [ Go programming language timestamp formatting] ( https://go.dev/src/time/format.go ) and the Human-readable timestamp formatting . See the table below for references and examples.
484496
485497::: sumo [ Best Practice]
486498We recommend using [ this code snippet] ( https://goplay.tools/snippet/WTFe5ZLU9PO ) as a quick way to locally test timestamp parsing with a format before configuring the source.
487499:::
488500
489501### Format Reference
490502
491- | Date Format | Reference Value |
492- | :------------------------------------------ | :-------------------------------------------------------------------- |
493- | Year | ` 2006 ` |
494- | Month Full Name | ` January ` |
495- | Month Abbreviated Name | ` Jan ` |
496- | Month Zero Leading Number | ` 01 ` |
497- | Month Number | ` 1 ` |
498- | Day Zero Leading Number | ` 02 ` |
499- | Day Number | ` 2 ` |
500- | Day Weekday Full Name | ` Monday ` |
501- | Day Weekday Abbreviated Name | ` Mon ` |
502- | 24 Hour Zero Leading Number | ` 15 ` |
503- | 12 Hour Zero Leading Number | ` 03 ` |
504- | 12 Hour Number | ` 3 ` |
505- | Minute Zero Leading Number | ` 04 ` |
506- | Minute Number | ` 4 ` |
507- | Second Zero Leading Number | ` 05 ` |
508- | Second Number | ` 5 ` |
509- | Fractional Seconds | ` .999 ` Milliseconds, ` .999999 ` Microseconds, ` .999999999 ` Nanoseconds |
510- | AM/PM Uppercase | ` PM ` |
511- | AM/PM Lowercase | ` pm ` |
512- | Timezone Offset without Colon Use Z for UTC | ` Z0700 ` |
513- | Timezone Offset with Colon Use Z for UTC | ` Z07:00 ` |
514- | Timezone Offset without Colon | ` -0700 ` |
515- | Timezone Offset with Colon | ` -07:00 ` |
516- | Timezone Abbreviated Name | ` MST ` |
503+ | Date Format | Reference Value | Human Readable Referencce Value |
504+ | :------------------------------------------ | :-------------------------------------------------------------------- | :--------------------------------------------------------------------- |
505+ | Year | ` 2006 ` | ` yyyy ` |
506+ | Month Full Name | ` January ` | ` - ` |
507+ | Month Abbreviated Name | ` Jan ` | ` MMM ` |
508+ | Month Zero Leading Number | ` 01 ` | ` MM ` |
509+ | Month Number | ` 1 ` | ` - ` |
510+ | Day Zero Leading Number | ` 02 ` | ` dd ` |
511+ | Day Number | ` 2 ` | ` - ` |
512+ | Day Weekday Full Name | ` Monday ` | ` - ` |
513+ | Day Weekday Abbreviated Name | ` Mon ` | ` - ` |
514+ | 24 Hour Zero Leading Number | ` 15 ` | ` HH ` |
515+ | 12 Hour Zero Leading Number | ` 03 ` | ` - ` |
516+ | 12 Hour Number | ` 3 ` | ` - ` |
517+ | Minute Zero Leading Number | ` 04 ` | ` mm ` |
518+ | Minute Number | ` 4 ` | ` - ` |
519+ | Second Zero Leading Number | ` 05 ` | ` ss ` |
520+ | Second Number | ` 5 ` | ` - ` |
521+ | Fractional Seconds | ` .999 ` Milliseconds, ` .999999 ` Microseconds, ` .999999999 ` Nanoseconds | ` .SSS ` Milliseconds, ` .SSSSSS ` Microseconds, ` .SSSSSSSSS ` Nanoseconds` |
522+ | AM/PM Uppercase | ` PM ` | ` a ` |
523+ | AM/PM Lowercase | ` pm ` | ` aa ` |
524+ | Timezone Offset without Colon Use Z for UTC | ` Z0700 ` | ` Z ` |
525+ | Timezone Offset with Colon Use Z for UTC | ` Z07:00 ` | ` Z ` |
526+ | Timezone Offset without Colon | ` -0700 ` | ` -HHmm ` |
527+ | Timezone Offset with Colon | ` -07:00 ` | ` -HH:mm ` |
528+ | Timezone Abbreviated Name | ` MST ` | ` zzz ` |
517529
518530### Format Examples
519531
520532| Standard | Timestamp in Log | Timestamp Format |
521533| :-------------------- | :------------------------------- | :------------------------------------ |
522534| RFC 3339 | ` 2024-02-01T16:07:57Z ` | ` 2006-01-02T15:04:05Z07:00 ` |
535+ | RFC 3339 | ` 2024-02-01T16:07:57Z ` | ` yyyy-MM-ddTHH:mm:ssZ ` |
523536| RFC 3339 Nano Seconds | ` 2024-02-01T16:07:57.541468757Z ` | ` 2006-01-02T15:04:05.999999999Z07:00 ` |
537+ | RFC 3339 Nano Seconds | ` 2024-02-01T16:07:57.541468757Z ` | ` yyyy-MM-ddTHH:mm:ss.SSSSSSSSSZ ` |
524538| Epoch | ` 1706803677 ` | ` epoch ` |
525539| Epoch in Milliseconds | ` 1706803677000 ` | ` epochMilli ` |
526540
0 commit comments