FDateTime is not correctly formatted by As Date Time when using any dates before January 1st, 1970.
From a conversation on Slack with MaxP:
this is probably an underflow
the ICU based string formatter converts the FDateTime to a unix timestamp, which is then formatted as a string
so you probably can't format any dates before January 1st 1970, because that's when the Unix epoch starts
that's a bug for the localization team
Reproduced in 4.7 branch from GitHub (4.7.4) and in Main (//depot/UE4/Promotable-CL-2495212)
1. Open any project
2. Create a new Actor Blueprint
3. Add a DateTime variable
4. Leave the default value (0001.01.01-00.00.00)
5. Get the DateTime variable > As Date Time > Print Text
6. Attach to Event Begin Play
7. PIE
Result:
Print String returns: "Jun 7, 1906, 1:35:44 PM". If the default is set to anything after 01/01/1970, the date/time is shown correctly (UTC-5h).
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Editor - UI Systems - Localization |
---|---|
Affects Versions | 4.7.3, 4.8 |
Target Fix | 4.9 |
Fix Commit | 2500391 |
---|
Created | Mar 30, 2015 |
---|---|
Resolved | Jul 14, 2015 |
Updated | Apr 27, 2018 |