General developer forum

Changing Calendar type at runtime

 
Picture of ariyan eghbal
Changing Calendar type at runtime
 

Hi
I need to change calendar type to Gregorian or Jalali or other calendar types at runtime in my local plugin regardless of selected user calendar type. 
in old releases of Moodle I did this by changing 

$CFG->calendar_system = 'gregorian';

after loading config.php

But now this doesn't help!

How can I change calendar type at runtime in latest version of moodle?

 
Average of ratings: -