Time zones
-
- Newbie
- Posts: 13
- Joined: Wed Feb 24, 2016 4:38 am
- Version: forma.lms 1.4.1
Time zones
Any plans to take advantage of the underutilized time_offset in i18n/lib.regset.php ? A user profile setting for the end-user to see local times would be ideal.
Re: Time zones
Hi drewlander, welcome on board
This feature isn't in our roadmap at the moment, we will consider adding it for future releases
If you are planning to add it by yourself we'll be happy to integrate it, or if you need this feature to be implemented earlier send us a pvt for a quote
This feature isn't in our roadmap at the moment, we will consider adding it for future releases
If you are planning to add it by yourself we'll be happy to integrate it, or if you need this feature to be implemented earlier send us a pvt for a quote
-
- Newbie
- Posts: 13
- Joined: Wed Feb 24, 2016 4:38 am
- Version: forma.lms 1.4.1
Re: Time zones
ill consider coding this one myself. I noticed the time_offset in lib.regset.php under i18n and tested it as working when using the value as minutes. I have not checked to see if that stores the times to the database with the offset or if it just changes the display value, and I have not checked the effects of the offset in all screens. If I were to implement such a feature, I would continue to store all times as UTC and use an offset for the display to the end user. Do you have any loose instruction before I set out to code this so I can make it useful for everyone?
-
- Newbie
- Posts: 13
- Joined: Wed Feb 24, 2016 4:38 am
- Version: forma.lms 1.4.1
Re: Time zones
Interesting thing about the time_offset is that it doesnt seem to exist "out-of-the-box" as a setting in core_reg_setting. I add it and it works as I expect, using the value in +/- minutes. It's like a hidden feature.
Anyway, I tested this and it does seem to store to the database with the offset. I think I can handle this but I'm open to any suggestions or concerns you might have.
Anyway, I tested this and it does seem to store to the database with the offset. I think I can handle this but I'm open to any suggestions or concerns you might have.
Re: Time zones
Hi drewlander
Take in mind that in the database all times, for all users, must be registered in the same timezone, otherwise SInce you can experiment some unexpected results when see or manage data cross-user.
If you have all the users in the same timezone , you don't need tweek anything , just set up correclty the timezone on your server / installation : at server level, at php and mysql level or at forma.lms configuration
Remember also that the php and mysql must be set in the same timezone, because some time calculations are made by database and other by php.
there are the following two parameters you can set in config.php (and perhaps in core_setting table) to handle the time zone
The pourpose of i18n library is to handle some regional settings related to a user or language: display of time, date, digit separator, decimal separator and so on
Take in mind that in the database all times, for all users, must be registered in the same timezone, otherwise SInce you can experiment some unexpected results when see or manage data cross-user.
If you have all the users in the same timezone , you don't need tweek anything , just set up correclty the timezone on your server / installation : at server level, at php and mysql level or at forma.lms configuration
Remember also that the php and mysql must be set in the same timezone, because some time calculations are made by database and other by php.
there are the following two parameters you can set in config.php (and perhaps in core_setting table) to handle the time zone
Code: Select all
//$cfg['timezone'] = 'Europe/Rome'; //define if different from php.ini setting
//$cfg['set_mysql_tz'] = false; //set mysql timezone same as php timezone , default false
Cercate nel forum le riposte prima di chiedere. Check the forum before posting
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
---------------
Claudio Anelli
Joint Technologies - Sistemi avanzati per l'information technology
http://www.joint-tech.com
---------------
-
- Newbie
- Posts: 13
- Joined: Wed Feb 24, 2016 4:38 am
- Version: forma.lms 1.4.1
Re: Time zones
Thanks for that information. Ill consider all these factors when I review over the weekend and reserve my immediate thoughts for some testing before I lay out a path.
thx
-d
thx
-d