From 9cd8f95c73cd31921fca9ce85dcbc7e7b7ebf9bb Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 3 Jan 2024 21:23:36 +0300 Subject: [PATCH] set tz t example --- writer_example_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/writer_example_test.go b/writer_example_test.go index c16036c..dfe6672 100644 --- a/writer_example_test.go +++ b/writer_example_test.go @@ -14,7 +14,7 @@ import ( func exampleWithTime(key, format string) log.Middleware { return func(ctx context.Context, e *entry.Entry, handler log.Logger) (int, error) { - return handler(ctx, e.Add(field.FormatTime(key, format, time.Unix(math.MaxInt32, 0)))) + return handler(ctx, e.Add(field.FormatTime(key, format, time.Unix(math.MaxInt32, 0).In(time.UTC)))) } } @@ -32,6 +32,6 @@ func ExampleFormatWithBracket() { serviceLogger := logger.With(log.WithName("service_name")) serviceLogger.Err(ctx, "error message") // Output: - // 2038-01-19T06:14:07+03:00 [info] writer_example_test.go:30 "imfo message" num=42 - // 2038-01-19T06:14:07+03:00 [error][service_name] writer_example_test.go:33 "error message" + // 2038-01-19T03:14:07Z [info] writer_example_test.go:30 "imfo message" num=42 + // 2038-01-19T03:14:07Z [error][service_name] writer_example_test.go:33 "error message" }