从 Flex-AS3 向 Java EJB 服务发送日期时出现问题

发布于 2024-10-06 19:14:04 字数 294 浏览 0 评论 0原文

我在 Java 源代码中有一个带有 java.util.Date 或 java.sql.Date 属性的 ValueObject,在 Flex-AS3 中有一个由 [RemoteClass] 使用日期 AS3 类型映射的 DTO。 当我在 Flex 中以 2010-09-05 格式在 DateField 组件中设置日期并将其发送到 Java 时,java 显示 2010-09-04 从 Flex 到

我使用的 java 有一天的差异Java EJB Service + GraniteDS + RemoteObject 进行通信。

谢谢!

I have a ValueObject in Java Source Code with a java.util.Date or java.sql.Date attribute and in Flex-AS3 have a DTO mapped by [RemoteClass] using a Date AS3 Type.
When I set a date in Flex with 2010-09-05 format YYYY-MM-DD in DateField component and send it to Java, java shows 2010-09-04 there is a difference of a day from flex to java

I'm using Java EJB Service + GraniteDS + RemoteObject to comunication.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

聚集的泪 2024-10-13 19:14:04

我发现在 Flex 和后端之间交换日期的最佳方法是使用字符串文字。否则,您将必须注意客户端和服务器之间的时区差异 - 这就是您看到不同日期的原因。如果您搜索 stackoverflow,您会发现更多讨论该问题的主题。

I found that the best way of exchanging dates between flex and the backend is to use string literals. Otherwise, you will have to take care of the time zone differences between client and server - that's why you see different dates. If you will search stackoverflow you will find more topics discussing about that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文