Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Date Time variables are not replicated

Date Time variables are not replicated when set to replicated. Quite simple.

Product Version: UE 4.9
more ▼

asked Oct 11 '15 at 07:12 AM in Bug Reports

avatar image

John Alcatraz
1.3k 57 139 125

avatar image Rudy Q ♦♦ STAFF Oct 12 '15 at 07:59 PM

Hello John,

I was able to to get this variable to replicate by creating a new actor and then having that actor and it's variable set to replicate. When using a print string to print out the variables I was able get both the client and the Server to print out the correct variables.

Quick questions:

  1. Can you replicate this issue in a clean project?

  2. Could you provide the exact steps that you are using when you run into the issue?

  3. Could you provide screen shots of the blueprint that you are currently using?

Note: During the investigation of this issue I found and reported a crash (UE-22011) that happens when splitting the back end of a Date and Time variable's set node. If this crash occurs you will need to be sure that all values that are being set are VALID values or else this will end in a crash.

avatar image John Alcatraz Oct 12 '15 at 08:08 PM

Hi Rudy,

I'm not the only one having the problem: https://answers.unrealengine.com/questions/302567/date-time-variables-do-not-replicate.html

I have not tried to replicate (:D) this issue in a new project because I saw that I'm not the only one seeing it. It's really strange that you got it working. There is no special setup I used, just having a DateTime variable in the PlayerState and trying to replicate it, I printed out the variable on RepNotify and it did never change on the client, the rep notify function was not even called on the client. Then I switched to using a MulticastRPC with the DateTime variable inside and there I saw the event is called on the client, but the variable I send with it is not correct on the client. Then I changed the event so that I don't send the DateTime variable but instead the broken DateTime variable (so a lot of floats) and that worked fine.

avatar image Rudy Q ♦♦ STAFF Oct 13 '15 at 04:05 PM

Could you try opening a new project and running the same setup that I am using?


  1. Create a new player state

  2. Create a new Date time Variable for the player state

  3. Open the game mode blueprint

  4. Assign the new player state to the player state class within the game mode alt text

  5. Save

  6. Open the player state

  7. Set the Date Time variable to RepNotify

  8. Open the RepNotify function and place a print string within to notify you when a change has occurred alt text

  9. In the Event graph on Begin play set the Date Time Variable alt text

  10. Play in Editor with at least 1 client and 1 server

  11. Notice that the print string is printed out on both the client and the server

avatar image John Alcatraz Oct 15 '15 at 06:36 PM

Hi Rudy, instead of setting it only on begin play, do something like adding 1 day on each tick or on a timer. And then print out the DateTime variable in the OnRepNotify.

avatar image Rudy Q ♦♦ STAFF Oct 15 '15 at 08:07 PM

I tired using a tick and other methods of changing the Date and time variable and then printing it out to the screen. The variables returned correctly and consistently on both client and sever. Are you using any other nodes such as the "Now" node that gives the current date and time?

avatar image John Alcatraz Oct 15 '15 at 08:15 PM

Are you sure you are not changing the date on both the client and server locally? I have just tried in a new project and the OnRepNotify is never called on the Client. This is how my tick looks like:

alt text

And thats the RepNotify:

alt text

avatar image skyflash Apr 10 '17 at 02:51 PM

This is still an active bug in 4.15 in April 2017.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello John,

After looking over your screen shots I was able to find that this is a known issue (UE-11876) and that it has been submitted to the developers for further consideration. I will be sure to bump up the community interest for this issue. Thank you for your time and information

Make it a great day

more ▼

answered Oct 16 '15 at 04:14 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

avatar image John Alcatraz Oct 16 '15 at 05:22 PM

Thanks Rudy. Could you tell me what exactly "UE-11876" is named? Does it only affect DateTime variables or is it a more general issue?

avatar image Rudy Q ♦♦ STAFF Oct 19 '15 at 01:08 PM

Hello John,

It's a more general issue dealing with the RepNotify function not firing on clients.

avatar image John Alcatraz Oct 19 '15 at 05:16 PM

Hey Rudy, why does it only happen with DateTime variables then? I can get all other variables to replicate correctly, at the moment I just break the DateTime and send the individual floats with a Multicast to every client and that works.

If "UE-11876" is not specifically for regarding DateTime variables it's not the fitting bug report for this.

avatar image Ben Halliday STAFF Oct 19 '15 at 05:32 PM

Hi John,

The bug report in question involves OnRep functions and the Switch Has Authority node. If you can repro this without using the Switch Has Authority node with other variable types, please let me know and we will add that information to the report; there is a related report that does not involve the Switch Has Authority node and the two reports are linked. Otherwise we have updated the bug to include the notes you've provided thus far.

In either case, please stop questioning my staff with regards to bug reports. It is not up to you whether what you are reporting suits a bug report we have in our system. You are welcome to give us additional information, and we welcome that, but I would appreciate some trust in our system.

Regardless of whether the particulars of the DateTime struct variable are involved, it is clearly related as the reproduction and result are identical. We added your notes to the report, and if one example is fixed but your example is still not working, the bug will fail verification until it is fixed or the developers ask us to open a separate bug. We do not clog our system with multiple instances of the same issue.

Thank you for understanding.

avatar image John Alcatraz Oct 19 '15 at 07:47 PM

Hey Ben and Rudy,

I am quite sure I wrote a comment to this 2 hours ago, have you seen it? I can't see it now and it might be a bug with the answerhub, I think I already had the same problem some months ago... Maybe you got a mail notification about it? It's a strange bug, and I surely can't reproduce it :)

avatar image Ben Halliday STAFF Oct 19 '15 at 07:55 PM

I haven't seen any notifications about a reply in my email. Do you remember what you were commenting?

avatar image John Alcatraz Oct 19 '15 at 08:17 PM

Ohh, that's sad, then I have to write it again. It's really strange, maybe I clicked accidentally on "cancel" instead of "comment"? I can't believe I could do that without noticing...

Well, regarding the topic:

I actually had a lot of trust in your system, and you probably know I have reported quite a lot of bugs during the last year, so I have a lot of experiences with this. And unfortunately there were more than one case where the answer I received was that its a known bug and already fixed in master branch or that it's a known bug named UE-XXXXX, but then after waiting a few months when I asked about a update I noticed that Epic think it's fixed, and the bug which is entered is fixed, but the bug I reported was actually something different.

And that's quite sad because then many month have passed without the developers even having a chance to fix it since they never knew about the bug. So I learned that I should always ask a few more times about what exactly a JIRA number is about to make sure it's the correct one. It's good for you since you get more precise bug reports which result in a more stable engine and it's good for me since I would really like to see all game breaking bugs I experience fixed at some time :) And a bug which is not entered correctly will probably never get fixed by the developers.

This bug is one of the cases where if I would not have asked about what the UE-XXXXX really stands for, in 6 months you might have said it's fixed but the real bug would still be there. Which would not be a huge problem in this case since it's really a minor bug and I have a fully working workaround. Just splitting the DateTime into floats and replicate the floats.

avatar image John Alcatraz Oct 19 '15 at 08:18 PM

It's quite simple to tell that the bug is not about "RepNotify function not firing on clients", because I can reproduce this without using any RepNotify functions :) It makes sense that the bug with the RepNotify might also affect DateTime variables since it affects all variables, but this does not mean it's the same one.

Just print the Date variable in the Tick of Server and Client and you will see that if the Server updates it, it will not replicate to the Client. I just used the RepNotify in the screenshots above because it looks better than printing something in Tick :) I like clean code.

avatar image Rudy Q ♦♦ STAFF Oct 22 '15 at 06:26 PM

Hello John,

Could you make sure that the Variable is being replicated to all clients. I did this by calling a custom event and I then had that custom event set Replicates to "Multicast".

alt text

Let me know if this works for you.

avatar image John Alcatraz Oct 22 '15 at 07:07 PM

Hey Rudy,

you are setting the DateTime locally to the local "Now" time - that works since you never replicate the variable, you only replicate the event so that every client sets it locally. In that case you also don't need the RepNotify on the variable since a client can never replicate anything to the Server.

You have to set the DateTime variable on the Server and then replicate it to the Client. That is what's not working. Either with trying to pass it through a multicast with the variable as the input or with just setting it to replicate, both will not work.

avatar image John Alcatraz Oct 22 '15 at 07:10 PM

This would be an example:

alt text

Increase the Date by one day on each tick on the server and the client will never print out the updated value.

avatar image Rudy Q ♦♦ STAFF Oct 22 '15 at 08:10 PM

After further investigation I was able to reproduce this issue on our end. I have written up a report ( UE-22533) and I have submitted it to the developers for further consideration. Thank you for your time and information.

Make it a great day

avatar image John Alcatraz Oct 22 '15 at 08:11 PM

Thank you very much Rudy :)

avatar image barneywilliams Jul 29 '16 at 05:53 PM

Sorry to resurrect a very old issue but was UE-22533 ever fixed? I have a struct with a number of variables that all replicate fine except for the FDateTime member. Just wondering whether I should be digging around or jsut skipping straight to a workaround.

avatar image Rudy Q ♦♦ STAFF Aug 01 '16 at 01:39 PM

Hello barneywilliams,

I have provide a link to the public tracker below. Please feel free to use the link for future updates.

Link: https://issues.unrealengine.com/issue/UE-22533

Make it a great day

avatar image barneywilliams Aug 08 '16 at 03:17 PM

Ah great thanks Rudy, managed to miss the rollout of the bug tracker - excellent news!

avatar image Tyler.Thompson Sep 11 '18 at 08:46 PM

I'm seeing issues with DateTime replicating properly in 4.19. The link that Rudy provided in 2016 is broken. Has replicating DateTime been fixed?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question