Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Birthdate is off by one day

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

When editing a user profile the date is always off by one day. For example if I enter 2/2/1980 as my birthday the saved value will be 2/1/1980.

Here is a video of it happening: www.youtube.com/watch?v=PpuuccVjhKY&feature=youtu.be
I have also seen reports of this happening for other JomSocial websites. This is happening for all of my users so it is not just my machine.

I tried this fix: www.jomsocial.com/blog/3-1-0-2-hot-fix-and-bugs-that-are-not
And changed the date format to $html .= "dateFormat: 'yy/mm/dd',n";

This partially worked, as the date started saving correctly, but for some reason now the input field when editing the profile field is empty. The HTML has the correct date, but this date is not appearing, either as text in the input field, or as the default value when using the calender popup:
<input type="text" id="datePickerField3" size="10" class="required jomNameTips tipRight input-medium hasDatepicker" value="2014-06-30" style="width:auto; cursor:pointer; color: #000;" readonly="" original-title="Enter your date of birth so other users can know when to wish you happy birthday ">

I've checked the database and it is saving the incorrect value. For example, 6-20-2014 will save as '2014-6-19 23:59:59'

Is this possibly a server configuration issue? I'm unable to find out exactly where this date change is happening. It does seem to be related to the date format, but I'm not sure how to fix that without creating other issues.

Thanks for any help.

PLEASE DO NOT UPDATE ANYTHING. There are customizations that will get broken and this is a live site.

12 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Elliott,

THis is old issue, which should work fine in version 3.2.0.5, may I know what is your Jomsocial version? I cant acces your backend so I cant check it by myself.

thank you

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

I am currently running 3.2.0.1 Pro. I will try an upgrade and see if that fixes the issue.

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

I updated to version 3.2.0.5 and am still having the same problem. Your Joomla access should now work.

Please let me know what I can do to fix this. It is still effecting all users on the system, both front end and back end when using Jom Social.

Thanks

12 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Elliott,

Ok good and you need to re-save the profile for fixing this..

If you still have the problem please let me know, and anyway the backend account is not working for me, can you verify it please?

thank you

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

I just tried to resave a birthdate and am still having the problem. How can I resend you the login info without making it public?

12 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Elliot,

You can edit this original topic www.jomsocial.com/index.php?option=com_k...id=17313&mesid=88041 and provide the info inside private info.

Thank you

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

I just updated the information. Please take a look and let me know what's going on. We are getting emails about this every day and I don't really know where to look to fix it.

Thanks

12 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

He Elliot,

I just check this issue again on your site and seems everything is working fine in my end.. look at my video here screencast.com/t/wQb9HRQfg

thank you and have a nice day!

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

I think we already established that this problem is only effecting people in certain time zones. Yes, it works for you, but in North America we are still having this problem. Here is a video of the problem: www.youtube.com/watch?v=-1JWwnVZre0&feature=youtu.be

So ... any ideas what is causing this? Or could you at least point me in the right direction so that I can look into it myself>

12 years 4 months ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Elliot,

I have just gone to the user that you showed in your video as well as the test one and cannot replicate the issue. I'm not saying there isn't an issue but the ones i tried (your original video) i cannot replicate the issue.

Could you try this for me please
1. Find a user that has the issue and try this
2. Edit the user in admin and change the birth date to another date
3. save the changes
4. Edit the user and put the birthdate back to what it should be 5
5. Save the changes

Does it now store the correct date or is the problem still there, The reason i ask this is after this bug is fixed any users that had the issue need to save their profile again to fix it at the user level.

If none of this helps them please tell me a few users that have the issue and i will check them

12 years 4 months ago
  • Elliott's Avatar
    Topic Author
  • Elliott
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Paul,

Thanks for you help. I actually found a fix which is why it is working now. The fix is below, which may help when developing the next version of the component if it can be integrated.

com_components/libraries/fields/date.php

change lines 155 and 156 to:
$html .= "joms.jQuery(\"#dpField" . $field->id . "day\").val((sDate.getUTCDate()));\n";
$html .= "joms.jQuery(\"#dpField" . $field->id . "month\").val(sDate.getUTCMonth() + 1);\n";

The problem is the JS guys are using the plain getDate() and getMonth() calls, which are not in a predictable timezone. So depending on what timezone those are evaluated for, you might end up with the birthday computations off by a day. Keep everything in UTC and timezone offsets won't back you up by a day.

12 years 4 months ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Elliot,

Thank you very much for updating us with that info, I will make sure that our developers see this information. Most importantly i'm glad your issue is resolved, even if it was by yourself. :)

Have a great day and thanks again

12 years 3 months ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Ellott,

I just wanted to let you know that your code changes have now been added to our release, many thanks for your input. Customer feedback is always apriciated

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW