Am 01.08.2019 um 10:09 teilte Jerome BENOIT mit: Hi,
> you want to use strftime : > > https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html > I'm aware of the functions and I've seen minimal usage examples on stackexchange. I'll try again later. > However, > would it not be safer to modify mp_time instead in case mp_time is use > elsewhere? > Original code is: mp_ps_print_nl(mp, "%%CreationDate: "); mp_ps_print_int(mp, round_unscaled(internal_value(mp_year))); mp_ps_print_char(mp, '.'); mp_ps_print_dd(mp, round_unscaled(internal_value(mp_month))); mp_ps_print_char(mp, '.'); mp_ps_print_dd(mp, round_unscaled(internal_value(mp_day))); mp_ps_print_char(mp, ':'); t = round_unscaled(internal_value(mp_time)); mp_ps_print_dd(mp, t / 60); mp_ps_print_dd(mp, t % 60); We'd have to calculate human readable time and then split it into 4 strings to populate the variables, if we want to do it right... H. -- sigfault #206401 http://counter.li.org
signature.asc
Description: OpenPGP digital signature