Certificate (plugin)

Certificate date wrong time zone?

 
 
Picture of Nano A
Certificate date wrong time zone?
 

Hi,

 

I'm printing a certificate with the option "Print date -  date issued".  Is this supposed to be the date the student collects the certificate?

In my case it is is printing with yesterday's date, so Where is it reading the date from?

Would this be a time zone problem? 

I am running Moodle 2.4 and latest version of Certificate in Github.  Location is UTC+10 (australia)

Oh, by the way, the issued date in "Summary of Previously Received Certificates"  is showing as the correct date, which is different to the date in the certificate.

 

Thanks!

 
Average of ratings: -
Picture of Nano A
Re: Certificate date wrong time zone?
 

Can someone please help me with this issue?

 

 
Average of ratings: -
Picture of Mark Nelson
Re: Certificate date wrong time zone?
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Nano,

The date issued is the date that the certificate was first viewed by the user. This date is simply what was stored in the database when the user clicked to view the certificate. When converting this date to a readable format it *should* pass the time through the function 'userdate' which takes into account the user's timezone. So, say for example the date of the server is in the US and the certificate was created at 8pm, when you view the date it was issued, it will not say 8pm, but the time that it was in your timezone. However, after looking at the code it seems that this varies when it uses the userdate function.

I have created a tracker issue (https://tracker.moodle.org/browse/CONTRIB-4111) to remind myself to do this when I get time to go through all the issues related to the certificate module.

Regards,

Mark

 
Average of ratings:Useful (1)
Picture of Nano A
Re: Certificate date wrong time zone?
 

Thanks for the update Mark.

 

 
Average of ratings: -
Picture of Jason [Moodle Enthusiast]
Re: Certificate date wrong time zone?
 

just verified this as something I could not figure out as well.  It in fact certainly did place the date of the initial day/time I viewed the certificate.


Wish there was a way to reset that, just in case someone take the course during a second year.  We offer the user to take the course each year.  And re-certify.  this "bug" issue won't allow for that.0

 
Average of ratings: -