Invalid timezone (+2800) causing a test failure

Timeline

sudoforge opened

Discussed in https://github.com/git-bug/git-bug/discussions/1385

Originally posted by mcepl April 28, 2025 I am trying to make configuration for git-bug on Sourcehut CI and tests fail to pass with this mysterious errors:

=== RUN   TestBugCommentNew
    bug_comment_add_test.go:17: 
        	Error Trace:	/home/build/git-bug/commands/bug/bug_comment_test.go:94
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:56
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:139
        	            				/home/build/git-bug/commands/bug/bug_comment_add_test.go:17
        	Error:      	Received unexpected error:
        	            	parsing time "Mon Apr 28 10:11:15 2025 +2800": time zone offset hour out of range
        	Test:       	TestBugCommentNew
--- FAIL: TestBugCommentNew (0.00s)
=== RUN   TestBugCommentEdit
    bug_comment_edit_test.go:22: 
        	Error Trace:	/home/build/git-bug/commands/bug/bug_comment_test.go:94
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:56
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:139
        	            				/home/build/git-bug/commands/bug/bug_comment_edit_test.go:22
        	Error:      	Received unexpected error:
        	            	parsing time "Mon Apr 28 10:11:15 2025 +2800": time zone offset hour out of range
        	Test:       	TestBugCommentEdit
--- FAIL: TestBugCommentEdit (0.00s)
=== RUN   TestBugComment
    bug_comment_test.go:24: 
        	Error Trace:	/home/build/git-bug/commands/bug/bug_comment_test.go:94
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:56
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:139
        	            				/home/build/git-bug/commands/bug/bug_comment_test.go:24
        	Error:      	Received unexpected error:
        	            	parsing time "Mon Apr 28 10:11:15 2025 +2800": time zone offset hour out of range
        	Test:       	TestBugComment
--- FAIL: TestBugComment (0.00s)

I have to admit that +2800 time zone baffles me a bit, moreover when I cannot find anywhere in the code where such time would be set. Is it something about setting TZ variable, locale, or something? Anybody any idea?

Thank you in advance for any response

sudoforge closed the bug

sudoforge closed the bug