UKismetMathLibrary::EqualEqual_DateTimeDateTime
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if two FDateTime values represent the exact same point in time. Comparison is tick-precise (100-nanosecond resolution).
Caveats & Gotchas
- • Exact equality on timestamps derived from different sources (e.g. FDateTime::UtcNow() called twice, or a network-replicated value) is almost never true due to tick-level differences. For "close enough" comparisons use Subtract_DateTimeDateTime and check the span against a tolerance.
- • UTC and local-time FDateTime values with the same wall-clock moment will not be equal — FDateTime has no timezone tag, so a UTC noon and a local noon on the same date compare equal only if both were constructed the same way.
Signature
static UE_INL_API bool EqualEqual_DateTimeDateTime( FDateTime A, FDateTime B ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FDateTime | First date-time to compare. | — |
| B | FDateTime | Second date-time to compare. | — |
Return Type
bool Example
Check for an exact saved timestamp C++
FDateTime Checkpoint = GetSavedCheckpointTime();
FDateTime Current = FDateTime::UtcNow();
if (UKismetMathLibrary::EqualEqual_DateTimeDateTime(Checkpoint, Current))
{
// Exact match — extremely rare in practice
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?