Incorrect time displayed in time segment #7282
Replies: 4 comments 1 reply
-
|
@abdalmoniem are you using the Android build? |
Beta Was this translation helpful? Give feedback.
-
|
yes I am, I guess 😅
|
Beta Was this translation helpful? Give feedback.
-
|
@abdalmoniem seems so yes, I don't have an android myself to test on though. No idea where this comes from, time indications are fetched from go itself, which I can't influence. |
Beta Was this translation helpful? Give feedback.
-
|
here's what I found: based on golang/go#20455, the time on mobile devices ( I tested it on my device and it seems to work:
so seems this is a known yet unresolved issue in |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Code of Conduct
What happened?
I've setup a termux terminal on Android with zsh, when I get the time from the shell the time is reported correctly, but
oh-my-poshshows the time -2 hrsscreenshot:

Theme
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "upgrade": { "source": "cdn", "interval": "24h", // "auto": true, "notice": true }, "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "options": { "cache_duration": "none" }, "leading_diamond": "\u256d\u2500\ue0b6", "template": "\uf120 {{ .Name }} ", "foreground": "#ffffff", "background": "#0077c2", "type": "shell", "style": "diamond" }, { "options": { "cache_duration": "none" }, "trailing_diamond": "\ue0b0", "template": " \uf0e7 ", "foreground": "#fffb38", "background": "#ef5350", "type": "root", "style": "diamond" }, { "options": { "cache_duration": "none" }, "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "background": "#906cff", "type": "python", "style": "powerline" }, { "options": { "cache_duration": "none", "folder_icon": "\uf07b", "home_icon": "\ue617 ~", "max_depth": 2, "mixed_threshold": 4, "style": "mixed" }, "template": " {{ .Path }} ", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "background": "#0000ff", "type": "path", "style": "powerline" }, { "options": { "branch_icon": "\ue725 ", "branch_max_length": 30, "cache_duration": "none", "fetch_status": true, "fetch_upstream_icon": true, "style": "full" }, "trailing_diamond": "\ue0b0", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#bd6200> \uf044 {{ .Working.String }}</>{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#053f22> \uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} \uf0c7 {{ .StashCount }}{{ end }} ", "foreground": "#424242", "background": "#fffb38", "type": "git", "style": "diamond", "foreground_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#053f22{{ end }}", "{{ if or (gt .Ahead 0) (gt .Behind 0) }}#0a703e{{ end }}" ], "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}", "{{ if gt .Ahead 0 }}#c792ea{{ end }}", "{{ if gt .Behind 0 }}#c792ea{{ end }}" ] }, { "options": { "always_enabled": true, "cache_duration": "none", "style": "austin", "threshold": 0 }, "trailing_diamond": "\ue0b4", "template": " \ue382 {{ .FormattedMs }} ", "foreground": "#ffffff", "background": "#333fff", "type": "executiontime", "style": "diamond" } ] }, { "type": "prompt", "alignment": "right", "segments": [ { "options": { "cache_duration": "none", "linux": "\uf17c", "macos": "\ue711", "windows": "\ue70f" }, "leading_diamond": "\ue0b6", "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} <#33ffaa>\ue0b2</>", "foreground": "#222222", "background": "#ccffbb", "type": "os", "style": "diamond", "invert_powerline": true }, { "options": { "cache_duration": "none", "time_format": "3:04:05 PM" }, "trailing_diamond": "\ue0b4", "template": "\udb85\udee1 {{ .CurrentDate | date .Format }}", "foreground": "#000000", "background": "#33ffaa", "type": "time", "style": "diamond", "invert_powerline": true } ] }, { "type": "prompt", "alignment": "left", "segments": [ { "options": { "cache_duration": "none" }, "template": "\u2570\u2500", "foreground": "#21c7c7", "type": "text", "style": "plain" }, { "options": { "always_enabled": true, "cache_duration": "none" }, "template": "{{ if gt .Code 0 }}\udb84\udc91❯ {{else}}❯ {{end}}", "foreground": "#e0f8ff", "type": "status", "style": "plain", "foreground_templates": [ "{{ if gt .Code 0 }}#ef5350{{ end }}" ] } ], "newline": true } ], "tooltips": [ { "options": { "fetch_status": true, "fetch_upstream_icon": true }, "leading_diamond": " \ue0b6", "trailing_diamond": "\ue0b4", "template": "{{ .HEAD }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}", "foreground": "#193549", "background": "#fffb38", "type": "git", "style": "diamond", "tips": [ "git", "g" ] } ], "version": 4 }What OS are you seeing the problem on?
Linux
Which shell are you using?
zsh
Log output
Beta Was this translation helpful? Give feedback.
All reactions