|
|
Rank: Apprentice Coder Groups: Member
Joined: 4/29/2011 Posts: 68 Points: 192
|
Looks like when I get a date from the server it gets converted by the middle tier into a local date. Is it possible to prevent dates serialization?
Thanks
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
This is done per the AMF specification. WebORB serializes dates in the UTF0 timezone.
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 4/29/2011 Posts: 68 Points: 192
|
Ok, but it is possible to get a date value without serialization? I tried to remove date type in config file but the results are still the same.
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
No, it is not possible. Serialization is what transfers the value from the server to the client. Without the serialization, how would the client get the value?
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 4/29/2011 Posts: 68 Points: 192
|
I understand that but I need to have a date value with no time zone being applied. Is that possible?
Thanks
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
It is not possible if your server side code returns dates as .NET date objects. To preserve the server-side timezone, you need to return dates as Strings. Alternatively, if the client app knows the timezone of the server, it can recalculate the date accordingly. Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 4/29/2011 Posts: 68 Points: 192
|
Yes, strings are a way to go. But what I am trying to preserve is not a server time but rather the original time value that was entered by a user. Let's say this is a time of an appointment. It has to be 2 pm everywhere. Time zone in this case is irrelevant, so the server time.
|
|
Rank: Apprentice Coder Groups: Member
Joined: 4/29/2011 Posts: 68 Points: 192
|
Sorry to be such an idiot, but while I was playing with server serialization configuration I removed Date type. Now, brought it back but I am still having an error that a date that hits the server is null. What exactly do I do make sure Date is getting serialized?
Thank you.
|
|
|
Guest |