Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › WP Member – Time format of member expiry date
- This topic has 10 replies, 6 voices, and was last updated 12 years, 7 months ago by
admin.
-
AuthorPosts
-
July 21, 2011 at 11:22 am #3852
ramona
ParticipantI have to change the date format (timestamp) in my login widget in that way: d.m.Y.
What file must I modify?
July 21, 2011 at 11:33 pm #34509amin007
ParticipantSearch for the following line of code from the “wp_eMember1.php” file and change it to whatever you like:
$sub_expires = date('F j, Y',strtotime("+" . $auth->my_subscription_duration . " days ", $sub_start));July 22, 2011 at 10:23 am #34510ramona
ParticipantFine, thank you.
July 23, 2011 at 8:24 am #34511ramona
ParticipantChanged it to j. F Y. But even I have set German language there are the English words for the month (e.g. July instead of Juli). Cannot find a hint in the language file.
July 24, 2011 at 12:27 am #34512amin007
ParticipantThe date value comes directly from your server’s PHP engine. When using the date function you might be able to specify the language that you want PHP to use in order to output the date value.
September 4, 2011 at 8:28 pm #34513blatternet
MemberDid you change something? I can’t find the string
$sub_expires = date(‘F j, Y’,strtotime(“+” . $auth->my_subscription_duration . ” days “, $sub_start));
in wp_eMember1.php (eMember 7.0.4).
September 5, 2011 at 1:51 am #34514admin
KeymasterYeah we moved some code around to make them more modular. On newer build of eMember you will find that line in the following file:
eMember_auth_utils.phpSeptember 5, 2011 at 3:35 am #34515blatternet
MemberCool, thank you!
December 17, 2011 at 7:30 pm #34516dboeckle
MemberFor other Europeans who don’t know much about php (like me) this could be another solution:
$sub_expires = date(‘d.m.y’,strtotime(“+” . $auth->my_subscription_duration . ” days “, $sub_start));
“d.m.y” will show the following date format: 17.12.2011
Please correct me if I am wrong.
Have a good time
David
March 9, 2013 at 2:52 pm #34517compass international
MemberI am trying to change the date format in the login widget, too. (Instead of: Your Account Expires: 15-03-2013 it should be Your Account Expires: 15. 03. 2013)
I don’t find the described code in eMember_auth_utils.php. Has the procedure changed? Or is there an easier way now?
March 11, 2013 at 1:01 am #34518admin
KeymasterIdeally, we like to use the same date format that you have set in the General settings of your WordPress installation. However, we have run into a little issue with non-english installation of WordPress.
For the time being, you can modify the following function in the “eMember_misc_functions.php” file to change the date format:
function emember_date_localeModify this function to return the date value in any format you like.
-
AuthorPosts
- You must be logged in to reply to this topic.