Fix tzdata not installed issue in termux env#2406
Fix tzdata not installed issue in termux env#2406A1311981684 wants to merge 1 commit intosipeed:mainfrom
Conversation
|
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. |
| "fmt" | ||
| "os" | ||
| "time" | ||
| _ "time/tzdata" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Tips: You could see the /system/usr/share/zoneinfo/tzdata at Android termux
sky5454
left a comment
There was a problem hiding this comment.
TZDATA, It exists on Android, but isn't recognized
| "fmt" | ||
| "os" | ||
| "time" | ||
| _ "time/tzdata" |
There was a problem hiding this comment.
Tips: You could see the /system/usr/share/zoneinfo/tzdata at Android termux
|
I found a method that might help you, and it's the standard Android variable read solution
|

📝 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
🤖 AI Code Generation
🔗 Related Issue
None.
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Details
No need to provide.☑️ Checklist