Flex date issue- Displaying wrong date

apache-flexdate

I am experiencing a very strange behavoiour of Flex Date object. My web service is written in .Net 3.5 and all object which I am retriving or updating have Creation Date (Date Type) in .Net code.

But when I am calling .Net web service and displaying data in Flex, Flex displaying a different Date than what stored in web service. When I update my object using Flex UI, every time update time is very different than actual update time set by .Net code.

Can any one help me solve this ?

Best Answer

Your date issues may be a result of how timezones and serialization are handled between Flex and your server. I've had problems with Flex dates and Java so I will explain somethings encountered there:

  • This describes how Flex transfers dates as UTC without timezone information.
  • You should also understand the assumptions .Net makes about timezones and daylight savings times for dates. I believe Java assumed the dates in the database were in the timezone of the server.
  • To not confuse myself while debugging I found comparing the UTC on the Flex and Server side useful.
  • You can simulate other timezones on your local machine for Flex by simply changing the computers time zone. I don't know if this works for .Net.
  • In the end, I used custom serialization to transfer dates as strings because constructing dates from strings was easier for me than understanding the implicit serialization that was happening.