I’ve recently discovered that the ‘C’ function strftime() has a reputation for behaving differently in different compilers. I have glib available here (though still at v2.24) and it seems to have a function called g_date_strftime() available - BUT - AFAICT it only supports the date formatting parameters (and not those that deal with times). Is there any glib function (or a combination of functions) that’s more like the standard strftime() ?
There is the g_date_time_format()
function.
Brilliant! I’ll give that a try - and many thanks.
A quick question… is there anywhere where I can find a list of the supported formatting parameters? (e.g. %H, %M, %S etc)
Unsurprisingly, you can find a list of all supported modifiers and their meaning in the API reference for g_date_time_format()
.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.