Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#168 User cannot change 'Modified Date' format

closed
nobody
5
2013-02-09
2012-10-28
miven
No

I see there is already a couple of requests for the very same thing
I ended up here for, and the last one got deleted for some reason,
so I looked into the issue a little further to ascertain why this would
be the case.

'Modified Date' format has nothing to do with xfe, and this is why:

The strftime() calls in libFOX use "%c" format which, at least for me,
produce strange and incorrect results. The date is technically
correct, but it's just in a bizarre format. I have no idea why, but
date +%c
from CLI, and
strftime ( buf, BUFLEN, "%c", (localtime(&t)) );
from C prog produce vastly different results in the format.
If anyone has a clue why this would be, feel free to email
mdooligan AT gmail DOT com with a hint or 2. I'll keep
looking into it in the meantime.

The hackish solution I kludged together goes like this:

You have to tweak libFOX: src/FXSystem.cpp, line 44:
change TIMEFORMAT to your liking as per the 'date' command,
whatever floats your boat.

and around line 75, in the function
FXString FXSystem::time(const FXchar *format,FXTime filetime)
change all the lines
FXint len=strftime(buffer,sizeof(buffer),format,localtime(&tmp));
to
FXint len=strftime(buffer,sizeof(buffer),TIMEFORMAT,localtime(&tmp));

Back out of the src/ dir, make install, and Bob's yer uncle.
Not pretty or elegant, but it works, at least for me.

Perhaps this so-called 'feature request' could be copied/moved
to somewhere people with this same issue can find it easier.
I'm obviously not the only one.

Discussion

  • miven
    miven
    2012-10-29

    I just noticed that there might be a proper fix for this issue in v1.33.

    Does anyone know where I might get v1.33? I can only find v1.32.4

     
  • Roland Baudin
    Roland Baudin
    2012-12-21

    Hi,
    unfortunately, the Sourceforge site incorrectly detects version 1.32.4 as the last one. I don't know how to fix it and if anyone know, I'll be glad to learn it.
    Anyway, here is the link to download version 1.33 : https://sourceforge.net/projects/xfe/files/xfe/
    I hope the bug you report is fixed now.
    RB

     
  • Roland Baudin
    Roland Baudin
    2013-02-09

    • status: open --> closed