• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / events / 13203928838

07 Feb 2025 04:28PM UTC coverage: 55.967%. Remained the same
13203928838

Pull #729

github

web-flow
Merge eca0e17c7 into 5ba97fee9
Pull Request #729: chore(deps): bump node-pg-migrate from 6.2.2 to 7.9.0

34 of 36 branches covered (94.44%)

Branch coverage included in aggregate %.

435 of 802 relevant lines covered (54.24%)

1.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.49
/src/modules/date.ts
1
import Time from "decentraland-gatsby/dist/utils/date/Time"
1✔
2

1✔
3
/**
1✔
4
 * Return a formatted label like (UTC) of with different timezone than UTC like (UTC -3)
1✔
5
 * @param time
1✔
6
 * @param useLocalTime
1✔
7
 * @returns
1✔
8
 */
1✔
9
const showTimezoneLabel = (
1✔
10
  time: Time.Dayjs | Date,
24✔
11
  useLocalTime: boolean | null | undefined = true
24✔
12
) => {
24✔
13
  time = Time.from(time)
24✔
14
  if (!useLocalTime || time.isUTC()) {
24✔
15
    return "(UTC)"
5✔
16
  }
5✔
17

19✔
18
  const zone = time.format("ZZ") // ±HHmm
19✔
19
  const sign = zone.slice(0, 1)
19✔
20
  const hours = zone.slice(1, 3)
19✔
21
  const minutes = zone.slice(3)
19✔
22

19✔
23
  if (hours === "00" && minutes === "00") {
24!
24
    return "(UTC)"
×
25
  }
×
26

19✔
27
  let result = "(UTC" + sign + String(Number(hours))
19✔
28

19✔
29
  if (minutes !== "00") {
24✔
30
    result += ":" + minutes
6✔
31
  }
6✔
32

19✔
33
  result += ")"
19✔
34

19✔
35
  return result
19✔
36
}
19✔
37

1✔
38
export { showTimezoneLabel }
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc