Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

SubmittedAt format

34 views
Skip to first unread message

Tim Nelson

unread,
Jan 8, 2012, 9:22:22 AM1/8/12
to postmark-ap...@googlegroups.com
Hi,

I'm seeing the API return the SubmittedAt field in different formats. Specifically, the millisecond field doesn't seem to have a fixed number of places. I was seeing responses with both 3 and 4 digits yesterday, but I just had this come back:

2012-01-08T14:03:05.1313304+00:00

This is in reference to MessageID 1c03e7f7-4d83-43e3-ba28-7e21f5b0d24c

This makes it difficult to parse. Shouldn't this be a fixed number of digits?

Thanks,
Tim

Milan Gornik

unread,
Jan 24, 2012, 1:59:14 PM1/24/12
to postmark-ap...@googlegroups.com
Hello Tim,

We're using JSON.NET serializer (specifically IsoDateTimeConverter), this is the standard output it provides for timestamps. There is a lot of regular expressions out there that might help you with parsing this string. Not sure which development environment and language you use, but most support regexes. This should save you the trouble.

Some recommendations:
"Regular Expressions Cookbook" (O'Reilly) By: Jan Goyvaerts, Steven Levithan (covers ISO 8601 with units smaller than seconds)
http://www.regexlib.com/ - search for ISO 8601

Regards,
Milan Gornik
Postmark developer, Wildbit
http://twitter.com/milan_gornik
Reply all
Reply to author
Forward
0 new messages