|
Date problem 3 Years, 1 Month ago
|
|
|
When I change a datefield lets say 1980-06-06 in a date before 1970-01-01 let say 1960-12-12
I get the message "1980-06-06 changed to 1970-01-01". In the CB profile the date is good.
When I then change is from 1960-12-12 to a date before 19-01-01 I don't get a message.
When I change it back to a date after 1970-01-01, lets say 1990-05-05 I get te message:
1970-01-10 changed tot 19-05-05.
In the table jos_comprofiler the type is "date".
Do you know what's the problem?
(sorry for my poor English).
Henkie
|
|
|
|
|
|
|
Re:Date problem 3 Years, 1 Month ago
|
|
|
This is a characteristic of many Unix systems and is not a problem with this plug-in. The plug-in uses Unix time functions to compare the entered time and stored time (in the database) to ensure they are the same format. The conversion is done by PHP functions that are based on an epoch (time=0) of 1970-JAN-01 00:00:00. Most likely, this conversion function is setting any value before the epoch time (0) to zero since time cannot be negative. As far as the 19-01-01 date, I am sure the system thinks 19 is 2019. I suspect the change from 1990 to 19 is due to the date format you have selected in the Community Builder configuration. Choose a date that uses a 4-digit year just to be sure. Also, instead of entering the date manually in the CB profile, use the pop-up calendar to ensure the proper date format is entered.
|
|
|
|
|
|
|
Re:Date problem 3 Years, 1 Month ago
|
|
|
I use always the popup- calender for entering the date's.
The format in CB is dd-mm-yyyy (dutch format). I have tried yyyy-mm-dd also, but the results are the same.
If jou don't have a solution I can't use your plugin because I have members of age (before 1970-01-01).
Hope to hear from you.
|
|
|
|
|
|
|
Re:Date problem 3 Years, 1 Month ago
|
|
|
I think I may have found the problem, but I am not really sure. I was using a function called strtotime, which is designed to handle ENGLISH time formats. I have switched to using the built-in CB dateConverter, which has the added benefit of sending changed dates in the configured CB date format.
|
|
|
|
|
|
|
Re:Date problem 3 Years, 1 Month ago
|
|
|
When I install this plugin I get the message:
Plugin version (1.1) different from Community Builder version (1.0.2)
I have CB version 1.0.2. installed (1.1 only for testing?).
|
|
|
|
|
|
|
Re:Date problem 3 Years, 1 Month ago
|
|
|
No, that's my fault. It's a "feature" of CB to not allow the plug-in version to be greater than the CB version. I never understood why they did that, but they did and it trips me up time and time again. If you've ever seen the movie "Good Morning Vietnam!" and observed the character Forrest Whitaker plays, who can't seem to remember the jeep is already running, I feel like that guy every time this happens.
Anyway, I simply changed the version back to 1.0 in the XML file and deleted the attachment on the previous post here.
|
|
|
|
|
|
|