Closed siko1056 closed 4 years ago
Ah, good catch!
I think on Linux and Mac, we can just call out to the date
command to do time zone conversion, as described here: https://superuser.com/questions/164339/timezone-conversion-by-command-line. There's probably an equivalent on Windows.
Fixed in https://github.com/apjanke/octave-packajoozle/commit/69223688c4d2282960231925d5217cf33a034df9, I think.
Can you give it another try now?
Thank you for the fix. Almost at speed of light now, but less time for coffee breaks :wink:
Excellent. And thank you for the report. I never would have noticed this myself, because I'm in US Eastern Time, a few hours behind UTC.
Unfortunately, the OF meta data caching strategy seems to be time zone depended.
https://github.com/apjanke/octave-packajoozle/blob/25540c63fe10fbdde5e2e9971f81f8bc4299fb5f/inst/%2Bpackajoozle/%2Binternal/OctaveForgeClient.m#L113-L116
The problem is, Octave's
stat()
function returns UTC time stamps (which might be better documented upstream), whereasnow()
returns the local time. Thus in my current JST time zone, the cache file is always outdated and has to annoyingly be refreshed quite often.Unfortunately, I do not know a solution myself, as Octave has not yet implemented datetime, which is one of your projects as well, I think.