toDateTime() has year 3000 bug

lfinilfini Member Luca FiniOrganization: INAFProject: Control software for Adaptive Optics System
I found it funny to notice that the string returned by toDateTime() utility uses two digits for the year (e.g.: today is represented as: "04/02/12"). I did not check but I think it also ignores the locale settings (e.g.: I could like better to have it as "02/04/2012").

All this makes the function not as general as I would like.

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    It's implemented using the strftime() C function with the "%x %H:%M:%S" format string, %x is replaced with local representation of the date.

    Cheers,
    Benoit.
  • lfinilfini Member Luca FiniOrganization: INAFProject: Control software for Adaptive Optics System
    Thanks!
    benoit wrote: »
    Hi,

    It's implemented using the strftime() C function with the "%x %H:%M:%S" format string, %x is replaced with local representation of the date.

    Cheers,
    Benoit.

    That was really useful. Now I know hot to get proper format out of toDateTime().


    Thanks,
    l.f.
Sign In or Register to comment.