UKismetMathLibrary::Now
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the current local date and time on the machine running the game. Wraps FDateTime::Now().
Caveats & Gotchas
- • Returns local time, not UTC — results vary depending on the machine's time zone. Use UtcNow() for any timestamp that will be stored, transmitted, or compared across machines.
- • On consoles and some platforms FDateTime::Now() may return UTC even though the function name implies local time, because the platform has no time zone concept. Test on your target platform.
Signature
static UE_INL_API FDateTime Now( ); Return Type
FDateTime Example
Log a timestamped event C++
FDateTime When = UKismetMathLibrary::Now();
UE_LOG(LogTemp, Log, TEXT("Event occurred at: %s"), *When.ToString()); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?