Joomlander.Net

...extensions by Bruce Scherzinger

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 12
TOPIC: Date problem
#434
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
henkie
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#435
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.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#436
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.
henkie
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#439
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.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#440
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?).
henkie
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#441
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.
brucescherzinger
Admin
Posts: 369
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: brucescherzinger

Member Access

Donations Accepted

Joomlander.Net is now accepting donations. Your donation, though not required to use this site or download files, will help to keep it online and keep the Joomla extensions coming. Donations are made through PayPal and are 100% secure. You can use your own PayPal account or any major credit card.

Joomlander.net is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo are used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.