• Harsh Chouraria's avatar
    Force use of UTC in formatting seconds into MM:SS · 347ae925
    Harsh Chouraria authored
    The job trace logs section parser computes section
    durations for the UIs by computing differences in
    epoch timestamps between the sections.
    
    However, when building the string represntation of
    the duration in MM:SS, its reliance on the Time
    library and the epoch time
    (0 seconds -> 00:00, extracted from 1970-01-01 00:00:00)
    means that it can be influenced by the timezone of the
    install host.
    
    When timezone of the host uses non-UTC types and involves
    an offset, such as +0530 (India Standard Time) then the
    UI displayed section durations of 00:NN as 30:NN.
    
    This change forces a UTC conversion of the computed
    epoch time from the seconds, which should help with
    showing the right duration values regardless of local
    timezone.
    
    Closes issue: https://gitlab.com/gitlab-org/gitlab/-/issues/332296
    
    Changelog: fixed
    347ae925
line.rb 2.82 KB