Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In TestViewRepo2, convert computed timezones to local time #24579

Merged
merged 4 commits into from
May 8, 2023

Commits on May 7, 2023

  1. In TestViewRepo2, convert timezones to local time

    This fixes up go-gitea#10446;
    in that, the *expected* timezone was changed to the local timezone,
    but the computed timezone was left in UTC.
    
    The result was this failure, when run on a non-UTC system:
    
    	Diff:
        --- Expected
        +++ Actual
        @@ -5,3 +5,3 @@
           commitMsg: (string) (len=12) "init project",
        -  commitTime: (string) (len=29) "Wed, 14 Jun 2017 09:54:21 EDT"
        +  commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC"
          },
        @@ -11,3 +11,3 @@
           commitMsg: (string) (len=12) "init project",
        -  commitTime: (string) (len=29) "Wed, 14 Jun 2017 09:54:21 EDT"
        +  commitTime: (string) (len=29) "Wed, 14 Jun 2017 13:54:21 UTC"
          }
        Test:       	TestViewRepo2
    
    I assume this was probably missed for the last couple months
    since the CI servers all run in UTC?
    
    The Format() string "Mon, 02 Jan 2006 15:04:05 UTC" was incorrect: 'UTC' isn't
    recognized as a variable placeholder, but was just being copied verbatim. It
    should use 'MST' in order to command Format() to output the attached timezone,
    which is what `time.RFC1123` has.
    kousu committed May 7, 2023
    Configuration menu
    Copy the full SHA
    f7ad823 View commit details
    Browse the repository at this point in the history
  2. Use time constant

    kousu committed May 7, 2023
    Configuration menu
    Copy the full SHA
    a10a725 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    79dfcd5 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    48d1e8c View commit details
    Browse the repository at this point in the history