My code:
print DateTime->now;
Response:
2012-08-17T20:16:37
Why is there a T? Is there an option I have forgotten?
The T is just a standard (ISO 8601) way to delimit the time. To use a different format, consider using strftime or format_cldr.
T
strftime
format_cldr
For example, to have a space instead, use DateTime->now->format_cldr("YYYY-MM-dd hh:mm:ss").
DateTime->now->format_cldr("YYYY-MM-dd hh:mm:ss")
2.1m questions
2.1m answers
60 comments
57.0k users