| 3 | |
| 4 | I write down here preliminary notes. |
| 5 | |
| 6 | First, GMT has no more any unambiguous meaning since 1972-01-01. The string "GMT" should be replaced by the official name "UTC" everywhere in source and help. |
| 7 | |
| 8 | Then the purpose of the function here is to produce a datetime string. OK but which datetime? This is untold and the $iType parameter only tells if the input structure is Local or UTC. |
| 9 | |
| 10 | It seems to me that we need another parameter to decide what the user wants (values for France at the time of writing, UTC+1 and currently +1h summertime): |
| 11 | |
| 12 | A) the current UTC time string, e.g. "2024-09-28T12:00:00 UTC", with or without the " UTC" suffix |
| 13 | or |
| 14 | B) his Local timestring, e.g. "2024-09-28T14:00:00+02:00", with or without the "+02:00" offset to UTC |
| 15 | or |
| 16 | C) yet another datetime format to be decided. |
| 17 | |
| 18 | Of course, $MS always making things tricky, the structure gives biais the other way, resp. -60 and -60 minutes (biais = UTC - Local). This means we have to subtract that biais from UTC to get local time. This is not done by the function. Also that biais sign should be reversed to be appended to a local time. |