Skip to content

Fix tzdata not installed issue in termux env#2406

Open
A1311981684 wants to merge 1 commit intosipeed:mainfrom
A1311981684:fix/tzdata_not_installed
Open

Fix tzdata not installed issue in termux env#2406
A1311981684 wants to merge 1 commit intosipeed:mainfrom
A1311981684:fix/tzdata_not_installed

Conversation

@A1311981684
Copy link
Copy Markdown

📝 Description

In termux env, tzdata is not installed or can be installed by pkg -i command. In the latest version 0.2.5, TZ info is acquired via env param, but since tzdata is not installed in the system, picoclaw fails to work with time correctly. The cron feature is baddly affected by this issue.

🗣️ Type of Change

  • [√ ] 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • [ √] 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

None.

📚 Technical Context (Skip for Docs)

  • Reference URL: none
  • Reasoning: none

🧪 Test Environment

  • Hardware:
  • OS:
  • Model/Provider:
  • Channels:

📸 Evidence (Optional)

Details No need to provide.

☑️ Checklist

  • [ √] My code/docs follow the style of this project.
  • [ √] I have performed a self-review of my own changes.
  • [ ×] I have updated the documentation accordingly.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zujianw seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sipeed-bot sipeed-bot bot added type: bug Something isn't working domain: cron labels Apr 7, 2026
"fmt"
"os"
"time"
_ "time/tzdata"
Copy link
Copy Markdown
Contributor

@sky5454 sky5454 Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://go.dev/src/time/tzdata/tzdata.go
According to the annotations in the official library

// Importing this package will increase the size of a program by about 450 KB.

For the Android architecture, use Bionic instead of glibc.

Another problem with finding time zones is more likely to be the TZ variable, which is not available on Android

Tips: You could see the /system/usr/share/zoneinfo/tzdata at Android termux

And I recommend you to try the GUI at Android: https://github.com/sipeed/picoclaw_fui/releases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tips: You could see the /system/usr/share/zoneinfo/tzdata at Android termux

Copy link
Copy Markdown
Contributor

@sky5454 sky5454 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TZDATA, It exists on Android, but isn't recognized

"fmt"
"os"
"time"
_ "time/tzdata"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tips: You could see the /system/usr/share/zoneinfo/tzdata at Android termux

@sky5454
Copy link
Copy Markdown
Contributor

sky5454 commented Apr 8, 2026

I found a method that might help you, and it's the standard Android variable read solution
golang/go#20455 (comment)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: cron type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants