Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Time Zone Mini App for A2App Robrix (exported from Mini Apps settings)

Open
#1,151 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
rust
Domain
frontend

Research direction

The body is a JSON export of a Mini App (a script source plus a UI layout and version history), and it never states what change is wanted. Before starting, a newcomer should ask on the issue whether this should be added to the repository, published elsewhere, or used as a test case for the Mini Apps feature. Done means a concrete request has been agreed with a maintainer.

Written by the indexing model from the issue text.

Description

{
"format": 2,
"id": "time-zones",
"name": "Time Zones",
"icon": "🌍",
"tint": 4886745,
"description": "Current time in Pacific, China and Central European time.",
"allow_net": false,
"permissions": [],
"shortcuts": [],
"source": "// name: Time Zones\n// icon: 🌍\n// tint: #4A90D9\n// description: Current time in Pacific, China and Central European time.\nfn mod(a, b){ return a - floor(a / b) * b }\nfn pad2(n){ if n < 10 { return "0" + n } return "" + n }\nfn dfc(y, m, d){\n let yy = y\n if m <= 2 { yy = y - 1 }\n let era = floor(yy / 400)\n let yoe = yy - era * 400\n let mp = m + 9\n if m > 2 { mp = m - 3 }\n let doy = floor((153 * mp + 2) / 5) + d - 1\n let doe = yoe * 365 + floor(yoe / 4) - floor(yoe / 100) + doy\n return era * 146097 + doe - 719468\n}\nfn civil(days){\n let z = days + 719468\n let era = floor(z / 146097)\n let doe = z - era * 146097\n let yoe = floor((doe - floor(doe / 1460) + floor(doe / 36524) - floor(doe / 146096)) / 365)\n let y = yoe + era * 400\n let doy = doe - (365 * yoe + floor(yoe / 4) - floor(yoe / 100))\n let mp = floor((5 * doy + 2) / 153)\n let d = doy - floor((153 * mp + 2) / 5) + 1\n let m = mp + 3\n if mp >= 10 { m = mp - 9 }\n if m <= 2 { y += 1 }\n return {y: y m: m d: d}\n}\nfn first_sun(y, m){\n let f = dfc(y, m, 1)\n return f + mod(7 - mod(f + 4, 7), 7)\n}\nfn last_sun(y, m){\n let l = dfc(y, m, 31)\n return l - mod(l + 4, 7)\n}\nfn fmt(t, off, abbr){\n let local = t + off * 3600\n let days = floor(local / 86400)\n let secs = local - days * 86400\n let h = floor(secs / 3600)\n let mi = floor((secs - h * 3600) / 60)\n let c = civil(days)\n let names = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]\n let wd = names[mod(days + 4, 7)]\n return {time: pad2(h) + ":" + pad2(mi) abbr: abbr date: wd + " " + c.y + "-" + pad2(c.m) + "-" + pad2(c.d)}\n}\nfn refresh(){\n let t = floor(time_now())\n let y = civil(floor(t / 86400)).y\n let us_s = (first_sun(y, 3) + 7) * 86400 + 10 * 3600\n let us_e = first_sun(y, 11) * 86400 + 9 * 3600\n let pt = fmt(t, -8, "PST")\n if t >= us_s && t < us_e { pt = fmt(t, -7, "PDT") }\n let eu_s = last_sun(y, 3) * 86400 + 3600\n let eu_e = last_sun(y, 10) * 86400 + 3600\n let ce = fmt(t, 1, "CET")\n if t >= eu_s && t < eu_e { ce = fmt(t, 2, "CEST") }\n let cn = fmt(t, 8, "CST")\n ui.pt_time.set_text(pt.time)\n ui.pt_date.set_text(pt.date + " · " + pt.abbr)\n ui.cn_time.set_text(cn.time)\n ui.cn_date.set_text(cn.date + " · China " + cn.abbr)\n ui.ce_time.set_text(ce.time)\n ui.ce_date.set_text(ce.date + " · " + ce.abbr)\n}\nlet _boot = start_timeout(0.05, || refresh())\nlet _tick = start_interval(5.0, || refresh())\n\nView{\n width: Fill height: Fill flow: Down\n ScrollYView{\n width: Fill height: Fill flow: Down spacing: 12 padding: 16\n Label{\n text: "World Clock" padding: 0 margin: 0\n draw_text +: { color: #x1C274C text_style: theme.font_bold{font_size: 20} }\n }\n Label{\n text: "Pacific · China · Central Europe" padding: 0 margin: 0\n draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "PACIFIC (PT)" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n pt_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n pt_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "CHINA" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n cn_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n cn_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "CENTRAL EUROPE (CET)" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n ce_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n ce_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n Button{ text: "Refresh" width: Fill on_click: || refresh() draw_text +: { color: #x1C274C } }\n }\n}",
"history": [
{
"version": {
"stamp": "20261005-095757",
"at_unix": 1791219477,
"note": "create a time zone app showing PT China time and CET",
"name": "Time Zones",
"icon": "🌍",
"tint": 4886745,
"description": "Current time in Pacific, China and Central European time.",
"origin": "Ai",
"actor": {
"user_id": "@matlu:matrix.org",
"display_name": "Mats Lundgren"
},
"host_version": "1.0.0-beta.1",
"host_revision": "77ee6cae",
"acquired_from": {
"kind": "generated",
"model": "Claude Code (your subscription) / sonnet"
},
"imported": false,
"parent": null,
"allow_net": false,
"permissions": [],
"shortcuts": [],
"scope": "Account",
"widget_recorded": true
},
"source": "// name: Time Zones\n// icon: 🌍\n// tint: #4A90D9\n// description: Current time in Pacific, China and Central European time.\nfn mod(a, b){ return a - floor(a / b) * b }\nfn pad2(n){ if n < 10 { return "0" + n } return "" + n }\nfn dfc(y, m, d){\n let yy = y\n if m <= 2 { yy = y - 1 }\n let era = floor(yy / 400)\n let yoe = yy - era * 400\n let mp = m + 9\n if m > 2 { mp = m - 3 }\n let doy = floor((153 * mp + 2) / 5) + d - 1\n let doe = yoe * 365 + floor(yoe / 4) - floor(yoe / 100) + doy\n return era * 146097 + doe - 719468\n}\nfn civil(days){\n let z = days + 719468\n let era = floor(z / 146097)\n let doe = z - era * 146097\n let yoe = floor((doe - floor(doe / 1460) + floor(doe / 36524) - floor(doe / 146096)) / 365)\n let y = yoe + era * 400\n let doy = doe - (365 * yoe + floor(yoe / 4) - floor(yoe / 100))\n let mp = floor((5 * doy + 2) / 153)\n let d = doy - floor((153 * mp + 2) / 5) + 1\n let m = mp + 3\n if mp >= 10 { m = mp - 9 }\n if m <= 2 { y += 1 }\n return {y: y m: m d: d}\n}\nfn first_sun(y, m){\n let f = dfc(y, m, 1)\n return f + mod(7 - mod(f + 4, 7), 7)\n}\nfn last_sun(y, m){\n let l = dfc(y, m, 31)\n return l - mod(l + 4, 7)\n}\nfn fmt(t, off, abbr){\n let local = t + off * 3600\n let days = floor(local / 86400)\n let secs = local - days * 86400\n let h = floor(secs / 3600)\n let mi = floor((secs - h * 3600) / 60)\n let c = civil(days)\n let names = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]\n let wd = names[mod(days + 4, 7)]\n return {time: pad2(h) + ":" + pad2(mi) abbr: abbr date: wd + " " + c.y + "-" + pad2(c.m) + "-" + pad2(c.d)}\n}\nfn refresh(){\n let t = floor(time_now())\n let y = civil(floor(t / 86400)).y\n let us_s = (first_sun(y, 3) + 7) * 86400 + 10 * 3600\n let us_e = first_sun(y, 11) * 86400 + 9 * 3600\n let pt = fmt(t, -8, "PST")\n if t >= us_s && t < us_e { pt = fmt(t, -7, "PDT") }\n let eu_s = last_sun(y, 3) * 86400 + 3600\n let eu_e = last_sun(y, 10) * 86400 + 3600\n let ce = fmt(t, 1, "CET")\n if t >= eu_s && t < eu_e { ce = fmt(t, 2, "CEST") }\n let cn = fmt(t, 8, "CST")\n ui.pt_time.set_text(pt.time)\n ui.pt_date.set_text(pt.date + " · " + pt.abbr)\n ui.cn_time.set_text(cn.time)\n ui.cn_date.set_text(cn.date + " · China " + cn.abbr)\n ui.ce_time.set_text(ce.time)\n ui.ce_date.set_text(ce.date + " · " + ce.abbr)\n}\nlet _boot = start_timeout(0.05, || refresh())\nlet _tick = start_interval(5.0, || refresh())\n\nView{\n width: Fill height: Fill flow: Down\n ScrollYView{\n width: Fill height: Fill flow: Down spacing: 12 padding: 16\n Label{\n text: "World Clock" padding: 0 margin: 0\n draw_text +: { color: #x1C274C text_style: theme.font_bold{font_size: 20} }\n }\n Label{\n text: "Pacific · China · Central Europe" padding: 0 margin: 0\n draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "PACIFIC (PT)" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n pt_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n pt_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "CHINA" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n cn_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n cn_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n RoundedView{ width: Fill height: Fit flow: Down spacing: 4 padding: 14\n show_bg: true draw_bg +: { color: #xF0F5FF border_radius: 12.0 }\n Label{ text: "CENTRAL EUROPE (CET)" padding: 0 margin: 0 draw_text +: { color: #x66708F text_style: theme.font_bold{font_size: 10} } }\n ce_time := Label{ text: "--:--" padding: 0 margin: 0 draw_text +: { color: #x0f88fe text_style: theme.font_bold{font_size: 36} } }\n ce_date := Label{ text: "" padding: 0 margin: 0 draw_text +: { color: #x333333 text_style: theme.font_regular{font_size: 12} } }\n }\n Button{ text: "Refresh" width: Fill on_click: || refresh() draw_text +: { color: #x1C274C } }\n }\n}"
}
],
"current_version": "20261005-095757"
}

Dominant language
Rust
Stars
489
Forks
71
Avg merge
1h 27m
Merged PRs (30d)
72

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from project-robius/robrix

All issues in project-robius/robrix

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.