Skip to content

Invalid timezone (+2800) causing a test failure #1387

Closed

Description

@sudoforge

Discussed in #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

Activity

  1. added a commit that references this issue on Apr 28, 2025
    2b41071
  2. added a commit that references this issue on Apr 29, 2025
    edbd105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions