set the time offset in the php file or create the value name for the region and assign it a value in minutes. (eg: time_offset = 240 )
in any course object, set another object as a "prerequisite".
notice that in the database, the "publish_to" field will have the 0000-00-00 date then the hours and minutes will total the time offset, thus making the material inaccessible.
i.e.) if the time offset val = 240 then the publish_to date will be "0000-00-00 00:04:00"
I uncovered this while investigating the possibility of adding time-zones for displaying dates based on the user profile as discussed in another thread. I'm not sure a bug is necessary unless the time_offset is actually used by anyone, but I felt it worth noting in this forum for any developer's edification on the subject.
I think that is not a bugs, but more investigation needed .
In any case, Care should be taken when using the timezone.
if all users have the same time zone you do not have to change the user display, simle set the correct TZ in the general configuration (remember that mysql and php timezone must be in sync).
if users use different timezone then you have to be careful what you put into the DB. in the DB all times should be stored with the same timezone (a good timezone in this case could be UTC or a well know TZ ) or must be stored with the TZ; all operations on dates / times should consider the TZ.
so, for me, the best thing would be
a) reading from the DB dates/times in UTC
b) do the calculations in UTC
c) transforming the date/time in user's TZ at display
a) getting a date/time in user TZ
b) turn it into UTC
c) make all the necessary calculations in UTC
d) save in DB the time in UTC
Joint Technologies - Sistemi avanzati per l'information technology