How can I get current unix timestamp in seconds or milliseconds using blueprint?

I want to get current unix timestamp to fetch data based on that but I can find no way to get current unix timestamp using blueprint. Can someone help?

Search for “UTC now”, that is the node you are looking for.

image

This gives the current UTC time on my computer. I want Unix timestamp which is the seconds happened after Unix Epoch (Jan 1, 1970).

I can subtract Jan 1, 1970 from UTC.Now but the DateTime-DateTime function is not available in UE5.

DateTime-DateTime function is not available in UE5.

It was broken from 5.0 to 5.2, but it’s there in 5.3. If upgrading engine is not an option - someone also reported that you can just copypaste this node from other engine version and it should work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.