AsDateTime (from UTC) Query

Hey there,

Please can someone provide a full list of this functions arguments for the string variable ‘In Time Zone’, please?

Thank you.

Not sure exactly what you’re asking as that seems like a blueprint only function and so it takes in the “Date Time” struct and the “In Time Zone” string as arguments. If you were looking for the C++ functions associated with the “FDateTime” struct you can check this link out:

If you wanted to know more about the FTimespan struct that is used in a lot in combination with the FDateTime struct you can check this out:

For more on the UTC function this explains when you want times independent of the user computer locale read this:

And this is an explanation of the blueprint node and its arguments:

Hope one of those is what you’re looking for!

Hey there,

Thank you for your reply.
On the last link you provided, it has a string input for the InTimeZone; where does it state what the acceptable arguments are, please?

I have an Excel table where the Time Zone abbreviation data is being pulled from, though some of the Time Zone abbreviations don’t work for the BP function.

I’ve opened up a test CPP project and searched for AsDateTime and found this:

	/* Converts a passed in date & time to a text, formatted as a date using the given timezone (default is the local timezone). This will convert the given date & time from UTC to the given timezone (taking into account DST). */
	UFUNCTION(BlueprintPure, meta=(DisplayName = "AsDate (from UTC)", AdvancedDisplay = "1"), Category="Utilities|Text")
	static FText AsTimeZoneDate_DateTime(const FDateTime& InDateTime, const FString& InTimeZone = TEXT(""));

Can you tell me where I can find where I can find the ‘InTimeZone’ lookup table, please?

Thank you in hope.

I have never used this particular note but it should work with any string. Looks like it just converts the input string into a text with the time data appended to it. What happens or what exactly do you mean when you say it doesn’t work with certain time zones? What does the output look like?

This node based on the Time Zone abbreviated code causes the time to be advanced/retarded.
I can’t upload the excel (.xlsx), or it’s .txt and .csv equivalent.
If you can provide an email address, I’ll ping the source file across.

It appears that the abbreviated codes I have, some work and some don’t, i.e., change, or not, to the correct time plus/minus UTC.

So I’m assuming there’s a lookup table somewhere that compares the incoming string, e.g., GMT/BST for UK, CET/CEST for Germany, etc.

I have got round the problem by not using the node and doing this:

It’s a little over engineered but works.

Thank you for your help Dude, really appreciated =]

Haha, nice! And no problem. Sorry we couldn’t figure it out, maybe someone else will later.

You responded, that’s help in its own right, lol.
Thank you =].

Just because this ranks rather high on google results.

I was looking into this topic and discovered two ways to reference timezones.
GMT offsets (e.g. “GMT+2”, “GMT-7”)
TZ Database Names (e.g. “US/Pacific”)
See this list as reference for TZ names: