You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Milestone的TargetDate与自定义DateTime字段同一日期存储差异问题

Why Rally's Milestone TargetDate and Custom DateTime Fields Store Dates Differently

Great question! The difference you're seeing comes down to a core distinction between Rally's built-in TargetDate field and custom DateTime fields in the Milestone object model—here's a breakdown:

1. Field Type & Intended Purpose

  • Built-in TargetDate: This field is actually a Date-only type, not a full DateTime. Even though you can pass an ISO DateTime string (like 2018-04-06T00:00:00.000Z) to it via the API, Rally automatically strips off the time and timezone components. It then aligns the date to the workspace's default timezone before storing it. For example, if your workspace uses a timezone like UTC-5, the UTC midnight timestamp you passed would translate to April 5th 19:00 local time, so Rally would store 2018-04-05 as the TargetDate.
  • Custom DateTime Field: This is a true DateTime type, designed to store full timestamp information including time and timezone. Rally will either preserve the original timezone from your input or convert it to the platform's server timezone (usually UTC) for storage, retaining the complete timestamp data.

2. How to Verify the Difference

You can confirm this behavior by querying the Milestone via the Rally API:

  • The TargetDate value will return as a plain date string (e.g., 2018-04-06 or adjusted to your workspace timezone's date).
  • The custom DateTime field will return the full ISO timestamp (e.g., 2018-04-06T00:00:00.000Z or the converted server timezone equivalent).

In the Rally UI, you'll also notice:

  • TargetDate uses a simple date picker with no time input option.
  • Custom DateTime fields show a date + time selector, reflecting the full stored timestamp.

3. How to Align the Values (If Needed)

If you want your custom field to match TargetDate's behavior:

  • Change the custom field's type from DateTime to Date (this will strip time data automatically, just like TargetDate).
  • Or, when sending data to the custom field, manually truncate the timestamp to just the date component (e.g., pass 2018-04-06 instead of the full ISO string).

If you need to retain time information, stick with the custom DateTime field and treat TargetDate as a separate date-only marker for milestone tracking.

内容的提问来源于stack exchange,提问作者Sarita

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:12:42