One day delay on passing Date value to DateTime value

I have mention before about my AIR project which communicate with .NET web service. There is some wrong casting type like DateTime, if you have tried to pass Flex’s Date class to .NET web service’s DateTime class directily, You will enforce that .NET web service framework will casting date value “delay” one day from given Flex’s Date.

The example is

Flex’s Date : 01/01/2008

will be turned into

.NET Date : 12/31/2008

The best solution that I have been using now is to send String value of Flex Date to web service, then use .NET framework to cast them back to DateTime value. This solution is proved. Nice!

PS. In other word, I am trying to format Flex’s DateField component’s format to match with common .NET DateTime class. It may useful ( Anybody who tried it already, please comment me! )

In Thai:

ผมเคยบ่นเกี่ยวกับปัญหาในการทำ AIR โปรเจคที่เชื่อมต่อกับ .NET Web Service มาแล้ว อย่างหนึ่งคือการส่ง Flex Date class ไปยัง .NET web service ตรงๆ ซึ่งจะทำให้เกิดปัญหา คือ .NET จะ cast value ให้มันช้าไปหนึ่งวัน! โอว ทำไมหน่ะหรอ…. นั่นสิ ทำไมล่ะ! ใครรู้ตอบผมที

ตัวอย่างเช่น

Flex’s Date : 01/01/2008

จะกลายเป็น

.NET Date : 12/31/2008

ซึ่งตอนนี้ยังงงๆ อยู่เลยครับ แต่วิธีที่ดีที่สุดตอนนี้คือ การส่ง string จาก flex ไป cast เป็น DateTime บน Web servcie เองครับ

Related posts:

  1. Flex’s Date class and .NET Web service DateTime class
  2. AIR to XFire Web Service
  3. AIR with .NET web service – custom attribute
  4. Flex on Campus!
  5. Let’s RIA with Flex