Description

Have attached examples of this in action, including breakpoints showing the FDateTime::Ticks count as zero. Also showed that this is an issue for the existing GetYear/GetMonth/GetDay methods (and any method that has a FDateTime param).

The MakeDateTime methods work perfectly fine as a workaround for inline definitions.

Have tested in 4.26 preview 6 and also 4.25.3 (both from launcher).

Steps to Reproduce

DateTime:

  1. Create BP Function
  2. Inside function, create local variable of type DateTime, populate it with a date, e.g.: 2020.01.01-10.00.00 +1000
  3. Call GetYear on the local DateTime variable and print result
  4. Note that the result doesn't match the defined local var value

Attached is an example where the year is defined as 2020, but the resulting year is 1; attaching debugger also shows FDateTime::Ticks value as 0.

Timespan:

  1. Create BP Function
  2. Inside function, create local variable of type Timespan, populate it with a date, e.g.: +00000010.12:09:00.000000000
  3. Call GetDays/GetHours/GetMinutes/etc on the local Timespan variable and print result
  4. Note that the result doesn't match the defined local var value

Attached is an example where the days is defined as 10, 12 as hours, 9 as minutes, and the result is 0.0:0:0. Same issue as before, FTimespan::Ticks value is 0.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-102656 in the post.

3
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions4.254.26
CreatedNov 6, 2020
ResolvedJul 19, 2022
UpdatedJul 19, 2022
View Jira Issue