Documentum DQL:如何获取日期列的 UTC 时区以解析为 .NET?

发布于 2024-12-17 23:26:50 字数 506 浏览 7 评论 0原文

Documentum(通过 DFC 的 DQL)始终将日期结果列返回为格式如下的字符串:

Wed Oct 19 16:01:59 PDT 2011

...并且 .NET DateTime.Parse 函数对此感到窒息 - 尤其是 PDT字符串的时区(TZ)部分——据我所知,在 DateTime 解析中没有这些 TZ 缩写的概念。当然,它会理解 +8:00,但不会理解 PDT

TZ 基于内容服务器的 TZ,该 TZ 可能并不总是与 Web 服务的使用者相同的 TZ(我们通过 Web 服务提供 DQL 结果)。

所以...如果我能让 Documentum 始终在这些字符串中给我 UTC 时间,我就可以在客户端上轻松地进行转换,并且始终拥有正确的时区。

这可以做到吗?内容服务器是否有 Documentum 设置以始终返回 GMT 时间?

替代解决方案?

Documentum (DQL via DFC) always returns Date result columns as a string formatted like this:

Wed Oct 19 16:01:59 PDT 2011

...and the .NET DateTime.Parse function chokes on this — especially the PDT time zone (TZ henceforth) part of the strings — as far as I can tell, there is no concept of these TZ abbreviations in the DateTime parsing. Sure, it'll understand +8:00 but not PDT.

The TZ is based on the TZ of the content server, which may not always be the same TZ as the consumer of the web service (we're feeding out the DQL results via web service).

SO... if I can get Documentum to ALWAYS give me the UTC time in those strings, I can do the conversion quite easily on the client and always have their correct time zone.

Can this be done? Is there a Documentum setting for the content server to always return GMT times?

Alternative solutions?

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

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

发布评论

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

评论(2

七分※倦醒 2024-12-24 23:26:50

有关日期格式,请参阅您可以在 dfc.properties 文件中定义的 dfc.date_format = 设置。

摘自 dfcfull.properties 的详细信息:

可以使用 Java SimpleDateFormat 类的语法指定日期格式

您拥有什么版本的 Content Server?在 D6.x 中,日期存储在 UTC 中,并由 Documentum 客户端应用程序转换为客户端的本地 TZ。欲了解更多详情,请参阅:
https://community.emc.com/message/545879#545879

For date format see dfc.date_format = setting which you can define in your dfc.properties file.

An excerpt from dfcfull.properties for details:

date format can be specied using the syntax of the Java SimpleDateFormat class

What version of Content Server do you have? In D6.x dates are stored in UTC and transformed to local TZ of client by Documentum client apps. For more details see:
https://community.emc.com/message/545879#545879

梦断已成空 2024-12-24 23:26:50

对于 DQL,有一个 datetostring 函数,可以像这样使用它,

select datetostring(r_creation_date, 'dd/mm/yyyy') from dm_document

它将返回 28/12/2014

或像这样的时间,

select datetostring(r_creation_date, 'dd/mm/yyyy hh:mi:ss') from dm_document

它将返回 28/10/2014 23:58:35

对于 DFC,不建议使用getString 获取日期。推荐使用getTime方法。它将返回 IDfTime 对象,该对象可以转换为标准 Date 对象。

For DQL there is a datetostring function and it is possible to use it like this

select datetostring(r_creation_date, 'dd/mm/yyyy') from dm_document

it will return 28/12/2014

or with time like this

select datetostring(r_creation_date, 'dd/mm/yyyy hh:mi:ss') from dm_document

it will return 28/10/2014 23:58:35

for DFC it is not recommended to use getString for dates. It is recommended to use getTime method. It will return IDfTime object that can be converted to standard Date object.

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