in reply to Get current time using Joda time format
"EEE MMM dd HH:mm:ss.SSS yyyy"
That looks similar to the CLDR format that DateTime supports. However, I haven't fully compared that spec to the link you provided to see if they really are compatible, so you'd need to do that. If they aren't compatible, you may need to write your own format string converter, as I haven't found anything with a quick search on CPAN yet. This does seem to work:
use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new(on_error=>'croak', time_zone=>'UTC', pattern => '%a %b %d %H:%M:%S.%3N %Y'); my $dt = $strp->parse_datetime('Fri Mar 24 11:54:55.234 2017'); print $dt->format_cldr('EEE MMM dd HH:mm:ss.SSS yyyy'), "\n"; __END__ Fri Mar 24 11:54:55.234 2017
|
|---|