v5:datetime:custom_dst
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
v5:datetime:custom_dst [2016/04/14 01:37] – created mnewnham | v5:datetime:custom_dst [2016/04/15 03:23] – mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ===== The Date Structure |
- | + | The format of $dateStructure | |
- | Allow you to define your own daylights savings function, adodb_daylight_sv. | + | |
- | If the function is defined (somewhere in an include), then you can correct for daylights savings. | + | |
- | + | ||
- | In this example, we apply daylights savings in June or July, adding one hour. This is extremely | + | |
- | unrealistic as it does not take into account time-zone, geographic location, current year. | + | |
- | + | ||
- | <code php> | + | |
- | function adodb_daylight_sv(& | + | |
- | { | + | |
- | if ($is_gmt) return; | + | |
- | $m = $arr[' | + | |
- | if ($m == 6 || $m == 7) $arr[' | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | This is only called by adodb_date() and not by adodb_mktime(). | + | |
- | + | ||
- | The format of $arr is | + | |
Array ( | Array ( | ||
| |
v5/datetime/custom_dst.txt · Last modified: 2023/05/18 18:51 by dregad