Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[#6548] The Time Machine?

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
7 years 10 months ago - 7 years 10 months ago #292341 by mikerotec
[#6548] The Time Machine? was created by mikerotec
Something odd about the "Baskets" page... The "completed on" date is always showing as BEFORE the "initiated" date!

Typically about SEVEN HOURS earlier, though this can vary somewhat. But it doesn't make sense to me, Completion happening before a basket is Initiated. Is it terminology, or is there some time-zone not being taken into account somewhere?


In the first example above, the Paypal transaction is marked (by paypal) as occurring at 16-Mar-2017 20:53:24 GMT-4

And indeed CBSubs basket is marked completed at 16-Mar-2017 20:53:24 .

HOWEVER, the basket was apparently "Initiated" some seven hours AFTER the payment was "completed". Time travel?

It seems that this page is not reporting times calculated to local server time.
I checked, and the server time is correct (linux server time) and with the correct time zone. Also, the Joomla time and timezone is correct.
Apache server logs are showing as accurate (tested!). Incidentally, I am browsing from a location in the same time zone as the server, and my local workstation time is correct.

The reason I say the page's time calc is off, is because the CBsubs basket page says "completed at 16-Mar-2017 20:53:24" - and one would assume its reporting all times in "Joomla time" (server time) which is GMT-7. However according to paypal it was actually completed at "16-Mar-2017 20:53:24 GMT-4". So CBsubs is reporting the completion three hours earlier than it really happened.

But even adjusting for THAT, the completion still somehow happened four hours earlier than the initiation...
Attachments:
Last edit: 7 years 10 months ago by krileon. Reason: Added [#6548] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 10 months ago #292344 by krileon
Replied by krileon on topic The Time Machine?
Check within _cbsubs_payment_baskets to see if this is actually the case. It's most likely just an on-display offset problem. All datetimes should be stored in the database as UTC then offset from there as that is the only means of accuracy when it comes to datetime calculations. Regardless this should not negatively impact the payment process in any way.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mikerotec

Please Log in or Create an account to join the conversation.

  • mikerotec
  • mikerotec
  • OFFLINE
  • Posts: 346
  • Thanks: 28
  • Karma: 2
7 years 10 months ago #292350 by mikerotec
Replied by mikerotec on topic The Time Machine?
Well, here is a db dump of time related fields from that top basket example:



time_completed and payment_date are in exact agreement with the Paypal reported payment time...

The "completed on" displayed on the baskets page is reporting exactly 7 hours off, so its actually reporting in GMT (not local time or server time).

The "initiated on" displayed on the baskets page is actually reporting just a few minutes before the REAL payment time. So I would say it's true and correct. The basket started at 17:52:27 local time, and the baskets page was able to calc that to properly display in local time (or server time... hard to say which since its the same for me!)

It looks reasonable... 17:52:27 basket, payment at 17:53:24, and the IPN pingback to us a few seconds later at 17:53:36.

So 'now I know'... I'll keep in mind that "completed" is displayed in GMT for the time being... :)
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 10 months ago #292373 by krileon
Replied by krileon on topic The Time Machine?
The stored values for completed don't look correct. It appears to have stored the completed date as PDT based off the payment date instead of converting it to UTC then storing as UTC. Everything should be stored and calculated from UTC. So could be a bug with the IPN handling when it comes to the payment date. I've added a bug ticket and let Beat know as I'm not sure if this is intended behavior. It shouldn't have any negative impact though as subscription is based off the UTC calculated dates of the basket and not the payment date.

#6548


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mikerotec

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum