"zhilizhao(赵志立)" (12021-12-29): > How about add a restriction like this: > > if (format.endsWith(“%S")) > enable the feature > else > warning message > > It’s a useful feature, it shouldn't create unexpected results, but > doesn’t need to support every use case. I would not oppose it, but I find it inelegant, especially because it requires a different expansion function, localtime_ms instead of localtime. What about this: with the original function "localtime", if the format ends in "%3N", then append the millisecond. It can later be expanded to support %xN at any place in the format for any value of x. Regards, -- Nicolas George