Hi Again, On 01/08/2019 15:10, Hilmar Preuße wrote: > 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.
I think it is the wrong way to proceed. > >> 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 > strings to populate the variables, This far harder that it looks. if we want to do it right... Anyway, I think the reverse must be done: modify mp_{year,month,day,time} . hth, Jerome > > H. > -- Jerome BENOIT | calculus+at-rezozer^dot*net https://qa.debian.org/developer.php?login=calcu...@rezozer.net AE28 AE15 710D FF1D 87E5 A762 3F92 19A6 7F36 C68B