philwilson.org

a geek commodity

Timestamps and UTC in Axis

July 10th, 2005 by Phil

Aaron Johnson recently had some fun with Axis / SOAP, Java and Calendar, which reminded me of an issue I had on my last project - our Axis-based app had been working fine for a few months, but we came in one morning to find that all our reporting tools were telling us that the clients thought our server was an hour out.

After many hours of scratching our heads, we suddenly realised that we’d just switched from GMT into BST and the applications hadn’t accounted for this. Like Aaron, we hadn’t realised that Axis’ CalendarDeserializer class internally converts everything to UTC since whilst we’d been developing everything was UTC. As soon as the last Sunday in March came around - bam!

Lesson I learned: always beware of what third party libraries are doing to your data. Unit tests should be your friends!

|

Leave a Comment




Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.