How To / General

time zone issue

  • Jason E
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 11 months ago #1 by Jason E
time zone issue was created by Jason E
This has been an ongoing issue. I have done several upgrades and even migrated to a VPS. Still the problem persists.

The problem is that I can only use UTC time zone. I can not change to my local or a USA time zone. There are time zone settings in both Joomla and Moodle. I have tried several variations but unless I set both to UTC, the enrollment is not recognized by joomdle and the course does not show up under 'my courses' until exactly 1 hour later even though they are enrolled according to moodle. I end up getting calls from customers who purchased courses (hikashop) wondering why they can't access the course. If I use moodle to unenroll and enroll then it shows up.

Everything works fine if I have both moodle and Joomla set to UTC. However this is confusing for both myself and customers. There have been times when it becomes an issue where the customer needs to meet a deadline and the UTC time zone has gone into the next calendar day while in the US time zone it is still before midnight.

I originally posted about this here.
www.joomdle.com/forum/shop-e-commerce-in...shop-order-sync-slow

In my day job I deal with similar issues when there is a time change, (in the US we change our clocks twice a year.) What happens is a system A will query an archive B for results but since the time stamp on results appears to A as though it is in the future and has not happened yet.

I would really like a resolution to this.

Thanks.

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

More
10 years 11 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic time zone issue
Hi Jason.

I don't know why this happens only on some enviroments. I have seen it in some installations, but not in most.
There is usually a way to make this work, by changing the timezone setting for the joomdle connector user. You can tweak it, test enrol, and see enrolment time, so you know how many hours you need to add/substract.

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

  • Jason E
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 7 months ago #3 by Jason E
Replied by Jason E on topic time zone issue
This is a big problem for me. Every month at the last day of the month I have problems with the certificate issue being the wrong date because of the time zone. For my audience this is very important.
It makes me look bad that the site doesn't work right and takes up my time to fix each certificate.

I have tried setting the time zone so that "users can select their own time zone" and changing the connecter user's time zone. I have tried several variations including setting the moodle time zone to 1 hour earlier or 1 hour later. But the only way it works is if moodle is set to UTC exact. I need it to be Hawaii time. UTC - 10

I am pretty sure this is a joomdle problem. Hikashop shows them a receipt. And in moodle they are enrolled successfully. So Hikashop is doing it's job. However the joomdle wrapper does not show the course for them until 1 hour later.

I don't know if this helps but I have seen similar behavior in other softwares calling on databases when they are looking for something from 'today' but the database time is in the future according to the software.

I really need a resolution to this please. I'm not in a huge hurry, like I said it's only a big problem for me on the last date of each month.

Thanks.

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

More
10 years 7 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic time zone issue
I don't really understand.

In your previous post you said:
- the course does not show up under 'my courses' until exactly 1 hour later even though they are enrolled according to moodle

That would happen for every course purchase, every day of the month.

Now you say:
> Every month at the last day of the month I have problems with the certificate issue being the wrong date because of the time zone

I don't know what certificate you talk about here. Is this Moodle certificate module?

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

  • Jason E
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 7 months ago - 10 years 7 months ago #5 by Jason E
Replied by Jason E on topic time zone issue
I'm sorry, I'll try to explain better.
What I sell is courses for continuing education credits for X-ray techs. They are required to complete the courses before the end of a specific month every 2 years. Everybody has a different month depending on their birthday. If they don't have the courses complete on time, they get in trouble. Even though they have 2 years to do this, quite a few people wait until the last day.

All my customers are in USA. In USA the time zones are UTC-5 (East Coast) to UTC-10 (Hawaii).
I want to use Hawaii time. But when I do, the course does not show up in joomdle wrapper until exactly 1 hour later, even though hikashop processed the order and payment and shows a receipt and they are yes in fact enrolled when I look in moodle. I have to go into moodle, find them, unenroll them and manually re enroll them. Then they show up in the moodle wrapper. People complain because they pay for a course and it just doesn't show up. They don't know that it will show up an hour later.

If I set the time zone to UTC, it works, that is they can purchase a course and it shows up immediately. But then, on the last day of the month, I get people complaining that they finished on August 31 9pm UTC-8 , This is equal to UTC time 6am Sep 1, the next calendar day. The time stamp in moodle is Sep 1 and this date is what shows in their certificate. The rest of the month it doesn't matter because the date stamp might be 1 day off but it's still inside the same month so they don't get in trouble and don't complain.

This doesn't have anything to do with the certificate. If I have someone who has the wrong date on the certificate, I have to go into the moodle database and change the time of exam completion, delete the certificate, then have them retrieve a new certificate.

I think what's happening is that without UTC, the time stamp is off between joomdle or joomla and moodle. Something is happening when joomdle calls up "my courses" to show the list that is preventing the new course from showing up.
Thanks.
Last edit: 10 years 7 months ago by Jason E.

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

More
10 years 7 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic time zone issue
> I think what's happening is that without UTC, the time stamp is off between joomdle or joomla and moodle. Something is happening when joomdle calls up "my courses" to show the list that is preventing the new course from showing up.

The problem is that enrolment is made in the future, ie: one hour from now. This happens because there are time config diferences betwen joomla and moodle.

If you want, send me access credentials to development@joomdle.com and I will take a quick look.

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

  • Jason E
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 7 months ago #7 by Jason E
Replied by Jason E on topic time zone issue
Although this happens even if I put moodle in the past.
ie Moodle UTC-1 Joomla UTC+1
Any combination other then UTC UTC does not work.

I don't understand why this should be a problem. Is there something in the joomdle enroll command that communicates enrollment time? If so is that necessary? If it's necessary, can it be adjusted?

Thanks.

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

  • Jason E
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
10 years 5 months ago #8 by Jason E
Replied by Jason E on topic time zone issue
Last month you got it working.
According to your email what you did was

- Changed Joomla time config to Honolulu
- Changed Moodle time config to use UTC-10 (and set users free to choose their timezone)
- Changed "Websystem user" time settings. I needed to do some testing, and finally set his setting to UTC-6, as with that enrolment was made as soon as order is confirmed, and with "now" time.

It was working fine until last week when I did a community builder update. There was an issue with user time zones with this latest patch.
When I applied the CB patch, I got a time zone error and it would not allow me to enter the user management section and gave time zone errors when a user tried to update their profile.

I hired someone to fix this problem, according to him, he made modifucations are on two places.
1. library/CBLib/Date/Date.php - setTimezone() method
2. Users with no set timezone were set with default "America/Detroit"

Either the patch, the error, or the fix made the same joomdle problem come back.

I checked and websys user is set to Honolulu.
I checked my server. It was set to UTC, I changed it to Honolulu but that did not fix the problem.
I changed the moodle websys user to Honolulu also but that did nothing.

I tried changing the server time zone (vps via whm) to Honolulu time, but that did not help.
I changed everything to UTC again and it works fine again. But as I said before, this causes me problems at month end with the date.

Thanks.

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