[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | 1999 onwards Martin Dougiamas {@link http://moodle.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 710 lines (24 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
olson_to_timezones($filename) X-Ref |
olson_to_timezones ($filename) Parses the olson files for Zones and DST rules. It updates the Moodle database with the Zones/DST rules param: string $filename return: bool true/false |
olson_simple_rule_parser($filename, $maxyear) X-Ref |
olson_simple_rule_parser($filename) Parses the olson files for DST rules. It's a simple implementation that simplifies some fields return: array a multidimensional array, or false on error |
olson_simple_zone_parser($filename, $maxyear) X-Ref |
olson_simple_zone_parser($filename) Parses the olson files for zone info return: array a multidimensional array, or false on error |
olson_parse_offset($offset) X-Ref |
olson_parse_offset($offset) parses time offsets from the GMTOFF and SAVE fields into +/-MINUTES return: int |
olson_parse_on($on) X-Ref |
olson_parse_on_($on) see `man zic`. This function translates the following formats 5 the fifth of the month lastSun the last Sunday in the month lastMon the last Monday in the month Sun>=8 first Sunday on or after the eighth Sun<=25 last Sunday on or before the 25th to a moodle friendly format. Returns an array with: startday: the day of the month that we start counting from. if negative, it means we start from that day and count backwards. since -1 would be meaningless, it means "end of month and backwards". weekday: the day of the week that we must find. we will scan days from the startday until we find the first such weekday. 0...6 = Sun...Sat. -1 means that any day of the week will do, effectively ending the search on startday. skipweeks:after finding our end day as outlined above, skip this many weeks. this enables us to find "the second sunday >= 10". usually will be 0. |
olson_parse_at($at, $set = 'set', $gmtoffset) X-Ref |
olson_parse_at($at, $set, $gmtoffset) see `man zic`. This function translates 2 time in hours 2:00 time in hours and minutes 15:00 24-hour format time (for times after noon) 1:28:14 time in hours, minutes, and seconds Any of these forms may be followed by the letter w if the given time is local "wall clock" time, s if the given time is local "standard" time, or u (or g or z) if the given time is univer- sal time; in the absence of an indicator, wall clock time is assumed. return: string a moodle friendly $at, in GMT, which is what Moodle wants |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |