How can I parse this date format that my web service is receiving in JSON format in Perl? I’d like to convert it to a DateTime object:
Date(1216647000000-0400)
I assumed it was milliseconds since the epoch along with a time zone offset but the dates are way off.
The time is listed in milliseconds since the epoch. Divide by 1000 to get epoch seconds.
Make sure this works with other cases you encounter: