baijianpeng VIP
Total posts: 239
29 Apr 2016 00:29

I have two types of periods: fixed length and fixed ending date.

When I manually activate user subscriptions, I noticed that Emerald always add one extra day to the ending date for expiration. I understand that, for a "fixed length" type, this extra one day is a must to make the period "real full length" since the current day is not a full day. But, for the "fixed ending date" type, if Emerald adds one extra day, the ending date will be one day after the ending date I announced in the plan details. This will cause confustion and distrust to users.

So I think you need to improve this algorithm, let the extra one day method still work for "fixed length" type of period, but for the "fixed ending date" type, just use the EXACT same ending date in that plan's settings.

Thank you.

Last Modified: 05 May 2016


Sergey
Total posts: 13,748
29 Apr 2016 12:03

I do not add any extra day. It is probably Joomla time zone offset.


baijianpeng VIP
Total posts: 239
03 May 2016 07:48

I don't know Emerald how to determine the "exact ending date" for "fixed ending date" type of subscriptions. I think, the best method is NOT to "calculate", just "copy" the ending date the admin had set for that plan.

In this way, I think there will not be any problem, since Emerald just COPIED the SAME date from plan settings.

What do you think about this idea?


Sergey
Total posts: 13,748
05 May 2016 15:16

The dates used to be a seriouse issue in Mighty Membership.

The problem begins with timezones. For example admin entered as 2:00pm but that was local time and real clien 6 hours ahead. It means user will not get it another 6 hours.

that is why we use only MySQL time. When we create start and end time, we get it from MySQL.

Sometimes on some servers MySQL time and PHP default time are different. This may produce some errors. But this way we are sure that user will get exact access time even in hours no matter in what timezone he is.

So ideal is to have your server time UTC and in Joomla set your timezone. Then php default time and MySQL time will be the same UTC and Joomla will add to the time when display.


baijianpeng VIP
Total posts: 239
05 May 2016 22:19

Understood now.

Thank you.

Powered by Cobalt