balala wrote: ↑March 8th, 2021, 7:29 pm
There might be setting in the Settings skin (Enigma\Options\Options.ini), but I didn't find it, so I'm gonna describe you how to make manually the needed adjustments.
You have to work with the Enigma\Taskbar\Clock\Clock.inc file. All clock skins of the Enigma\Taskbar\Clock config will get the new format. So open the above Clock.inc file and look for and replace the Format option of the [MeasureText] measure (Format="%#I.%M") by Format=%#H.%M. Note that beside replacing the I format option by H, I did remove the absolutely not-needed quotes as well.
Thanks.. I'm using the standalone version without Enigma, but I found the equivalent options in \@Resources\Measures\Reader.lua
Under function Output() I changed this line:
local Timestamp = SELF:GetOption('Timestamp', '%I:%M %p %A %b %d')
to
local Timestamp = SELF:GetOption('Timestamp', '%H:%M %A %b %d')
markpud wrote: ↑March 9th, 2021, 1:23 pm
Thanks.. I'm using the standalone version without Enigma, but I found the equivalent options in \@Resources\Measures\Reader.lua
Under function Output() I changed this line:
local Timestamp = SELF:GetOption('Timestamp', '%I:%M %p %A %b %d')
to
local Timestamp = SELF:GetOption('Timestamp', '%H:%M %A %b %d')
Not sure what you mean by "standalone version without Enigma", however I'm glad if you succeded.
markpud wrote: ↑March 9th, 2021, 2:42 pm
I don't have the enigma skin on my system at all.. The OP has 2 versions, I installed the 2nd one which is based on Enigma Gcal but is standalone
Alright. But now it does work in 24-hour format, right?
I managed to find a work around to the recurrent event time displacement anomaly vortex issue.
I didn't spend much time on it so its not very elegant. Basically, you add "RPT" at the end (or anywhere) in the title of a repeating event. You can obviously change RPT to anything, set by rpt_tag. It will offset the time by the amount specified in rpt_correction, which you will need to determine what value is required for you (I was 4 hours off).
for RawItem in Raw:gmatch(Type.MatchItem) do
local Item = {}
-- MATCH RAW DATA
Item.Unread = 1
if (t == 'iCalendar') then
Item.Title = RawItem:match('SUMMARY:(.-)\n') or nil
if (string.len(Item.Title) == 1) then
Item.Title = RawItem:match('DESCRIPTION:(.-)\n') or nil
end
Item.Title = Item.Title:gsub('\\', '')
else
Item.Title = RawItem:match('<title.->(.-)</title>') or nil
end
-- ADD THIS HERE
if string.find(Item.Title, rpt_tag) then
repeat_event = true
else
repeat_event = false
end
-- END ADD
Item.Date = RawItem:match(Type.MatchItemDate) or nil
line 640 ish, add portion between ADD THIS HERE -> END ADD
function IdentifyDate(s, t)
local Date = nil
Date = s and Types[t].ParseDate(s) or {}
Date.year = tonumber(Date.year) or nil
Date.month = tonumber(Date.month) or MonthAcronyms[Date.month] or nil
Date.day = tonumber(Date.day) or nil
Date.hour = tonumber(Date.hour) or nil
Date.min = tonumber(Date.min) or nil
Date.sec = tonumber(Date.sec) or 0
-- ADD THIS HERE
if repeat_event then
Date.hour = Date.hour + rpt_correction
end
-- END ADD
-- FIND ENOUGH ELEMENTS, OR DEFAULT TO RETRIEVAL DATE
local RealDate, AllDay
if (Date.year and Date.month and Date.day) then
RealDate = 1
In the Reader.lua file, go to line 634 where the UTC set. Change os.date('!*t') to os.date('*t') (or just remove ! ) to fix the time issue.
theworkaroundguy wrote: ↑July 7th, 2021, 8:09 pm
I managed to find a work around to the recurrent event time displacement anomaly vortex issue.
I didn't spend much time on it so its not very elegant. Basically, you add "RPT" at the end (or anywhere) in the title of a repeating event. You can obviously change RPT to anything, set by rpt_tag. It will offset the time by the amount specified in rpt_correction, which you will need to determine what value is required for you (I was 4 hours off).
for RawItem in Raw:gmatch(Type.MatchItem) do
local Item = {}
-- MATCH RAW DATA
Item.Unread = 1
if (t == 'iCalendar') then
Item.Title = RawItem:match('SUMMARY:(.-)\n') or nil
if (string.len(Item.Title) == 1) then
Item.Title = RawItem:match('DESCRIPTION:(.-)\n') or nil
end
Item.Title = Item.Title:gsub('\\', '')
else
Item.Title = RawItem:match('<title.->(.-)</title>') or nil
end
-- ADD THIS HERE
if string.find(Item.Title, rpt_tag) then
repeat_event = true
else
repeat_event = false
end
-- END ADD
Item.Date = RawItem:match(Type.MatchItemDate) or nil
line 640 ish, add portion between ADD THIS HERE -> END ADD
function IdentifyDate(s, t)
local Date = nil
Date = s and Types[t].ParseDate(s) or {}
Date.year = tonumber(Date.year) or nil
Date.month = tonumber(Date.month) or MonthAcronyms[Date.month] or nil
Date.day = tonumber(Date.day) or nil
Date.hour = tonumber(Date.hour) or nil
Date.min = tonumber(Date.min) or nil
Date.sec = tonumber(Date.sec) or 0
-- ADD THIS HERE
if repeat_event then
Date.hour = Date.hour + rpt_correction
end
-- END ADD
-- FIND ENOUGH ELEMENTS, OR DEFAULT TO RETRIEVAL DATE
local RealDate, AllDay
if (Date.year and Date.month and Date.day) then
RealDate = 1
markpud wrote: ↑March 9th, 2021, 1:23 pm
Thanks.. I'm using the standalone version without Enigma, but I found the equivalent options in \@Resources\Measures\Reader.lua
Under function Output() I changed this line:
local Timestamp = SELF:GetOption('Timestamp', '%I:%M %p %A %b %d')
to
local Timestamp = SELF:GetOption('Timestamp', '%H:%M %A %b %d')
Hi, can you help me to localize in other languages this part? TIA
Nicknightfly wrote: ↑October 21st, 2022, 9:51 am
Hi, can you help me to localize in other languages this part? TIA
Please help us to can help you, when you1re asking for help. For instance, which skin of the package are you working with? And what do you mean by "localize in other languages this part"? Would you want to get localized times? Sorry but at least for me, it's not really clear what you want.