Device-side strftime implementation?

Has anybody come across, or written, an implementation of the strftime() function which runs in CUDA device-side code?

I’m fine with a version which assumes the default locale (rather than taking the locale as input).